{
	"info": {
		"_postman_id": "1dd82681-661c-411b-87ca-afa207ef715d",
		"name": "SharePoint",
		"description": "[Microsoft Graph](https://learn.microsoft.com/en-us/graph/overview) is the unified API for modern work. It is the gateway to data and intelligence in Microsoft 365. Use the wealth of data in Microsoft Graph to build apps for organizations and consumers that interact with millions of users.\n\nMicrosoft Graph supports [two access scenarios](https://learn.microsoft.com/en-us/graph/auth/auth-concepts), delegated access and app-only access. In delegated access, the app calls Microsoft Graph on behalf of a signed-in user. In app-only access, the app calls Microsoft Graph with its own identity, without a signed in user.\n\nIn this collection, you can try out both delegated and application API calls.\n\n# To Get Started\n\n[Fork this collection](https://www.postman.com/microsoftgraph/workspace/microsoft-graph/collection/455214-085f7047-1bec-4570-9ed0-3a7253be148c/fork) into your workspace to get started with the Microsoft Graph APIs. For more details on how to use Postman with the Microsoft Graph APIs, see our step-by-step guide [here](https://www.postman.com/microsoftgraph/workspace/microsoft-graph/folder/455214-22cdc431-705b-42ab-91d0-4d63ee1bc05c).\n\n# Microsoft Graph API documentation\n\nSee the full API documentation [here](https://learn.microsoft.com/en-us/graph/).",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "31772994"
	},
	"item": [
		{
			"name": "Delegated",
			"item": [
				{
					"name": "SharePoint",
					"item": [
						{
							"name": "Get my organization's default site collection",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Sites.Read.All* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"        }\r",
											"        else\r",
											"        {\r",
											"            var json = JSON.parse(responseBody);\r",
											"            postman.setEnvironmentVariable(\"SiteId\", json.id);\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites/root",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites",
										"root"
									]
								}
							},
							"response": []
						},
						{
							"name": "Get the doc libs in root site",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Sites.Read.All* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"        }\r",
											"        else\r",
											"        {\r",
											"            var json = JSON.parse(responseBody);\r",
											"            postman.setEnvironmentVariable(\"ListId\", json[0].id);\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites/root/drives",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites",
										"root",
										"drives"
									]
								}
							},
							"response": []
						},
						{
							"name": "Search for site by name",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Sites.Read.All* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites?search=contoso",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites"
									],
									"query": [
										{
											"key": "search",
											"value": "contoso"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get subsites of site",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Sites.Read.All* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites/root/sites",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites",
										"root",
										"sites"
									]
								}
							},
							"response": []
						},
						{
							"name": "Get site columns",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Sites.Read.All* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites/root/columns",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites",
										"root",
										"columns"
									]
								}
							},
							"response": []
						},
						{
							"name": "Get site content types",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Sites.Read.All* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites/root/contentTypes",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites",
										"root",
										"contentTypes"
									]
								}
							},
							"response": []
						},
						{
							"name": "Get site lists",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Sites.Read.All* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"        }\r",
											"        else\r",
											"        {\r",
											"            var json = JSON.parse(responseBody);\r",
											"            postman.setEnvironmentVariable(\"ListId\", json.value[0].id);\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites/root/lists",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites",
										"root",
										"lists"
									]
								}
							},
							"response": []
						},
						{
							"name": "Get list columns",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Sites.Read.All* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites/{{SiteID}}/lists/{{ListId}}/columns",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites",
										"{{SiteID}}",
										"lists",
										"{{ListId}}",
										"columns"
									]
								}
							},
							"response": []
						},
						{
							"name": "Get list content types",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Sites.Read.All* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites/root/lists/{{ListId}}/contentTypes",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites",
										"root",
										"lists",
										"{{ListId}}",
										"contentTypes"
									]
								}
							},
							"response": []
						},
						{
							"name": "Get list items",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Sites.Read.All* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites/root/lists/{{ListId}}/items",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites",
										"root",
										"lists",
										"{{ListId}}",
										"items"
									]
								}
							},
							"response": []
						},
						{
							"name": "Get list items titled \"Contoso Home\"",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Sites.Read.All* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									},
									{
										"key": "Prefer",
										"value": "HonorNonIndexedQueriesWarningMayFailRandomly",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites/root/lists/{{ListId}}/items?$filter=fields/Title eq 'Contoso Home'",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites",
										"root",
										"lists",
										"{{ListId}}",
										"items"
									],
									"query": [
										{
											"key": "$filter",
											"value": "fields/Title eq 'Contoso Home'"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "GetListAlternative",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://timextender.sharepoint.com/sites/PowerBITest/_api/Web/Lists(guid'7c613236-3d5f-4ceb-bc22-00e6241e68b6')/Items",
									"protocol": "https",
									"host": [
										"timextender",
										"sharepoint",
										"com"
									],
									"path": [
										"sites",
										"PowerBITest",
										"_api",
										"Web",
										"Lists(guid'7c613236-3d5f-4ceb-bc22-00e6241e68b6')",
										"Items"
									]
								}
							},
							"response": []
						}
					],
					"description": "This folder contains delegated requests around accessing you and your organizations SharePoint sites.\n\nTo learn more, see:\n\n- [Working with SharePoint sites in Microsoft Graph - Microsoft Graph v1.0 | Microsoft Learn.](https://learn.microsoft.com/en-us/graph/api/resources/sharepoint?view=graph-rest-1.0)"
				},
				{
					"name": "Files",
					"item": [
						{
							"name": "Get my files",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Files.Read* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/me/drive/root/children",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"me",
										"drive",
										"root",
										"children"
									]
								}
							},
							"response": []
						},
						{
							"name": "Get my recent files",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Files.Read* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/me/drive/recent",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"me",
										"drive",
										"recent"
									]
								}
							},
							"response": []
						},
						{
							"name": "Get files shared with me",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Files.Read* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/me/drive/sharedWithMe",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"me",
										"drive",
										"sharedWithMe"
									]
								}
							},
							"response": []
						},
						{
							"name": "Search my OneDrive",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Files.Read* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/me/drive/root/search(q='finance')?select=name,id,webUrl",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"me",
										"drive",
										"root",
										"search(q='finance')"
									],
									"query": [
										{
											"key": "select",
											"value": "name,id,webUrl"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Create a folder",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.response.status === \"Forbidden\")\r",
											"        {\r",
											"            console.log(\"You need to add user delegated permissions in your application to at least *Files.ReadWrite* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Delegated folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"name\": \"New Folder\",\n  \"folder\": {}\n}"
								},
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/me/drive/root/children",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"me",
										"drive",
										"root",
										"children"
									]
								}
							},
							"response": []
						}
					],
					"description": "This folder contains delegated requests around accessing and manager a user's files.\n\nYou can use Microsoft Graph to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries. With Microsoft Graph, you can build a variety of experiences with files stored in Microsoft 365, from simply storing user documents to complex file-sharing scenarios.\n\nTo learn more, see:\n\n- [OneDrive file storage API overview - Microsoft Graph | Microsoft Learn](https://learn.microsoft.com/en-us/graph/onedrive-concept-overview)\n- [Working with files in Microsoft Graph - Microsoft Graph v1.0 | Microsoft Learn](https://learn.microsoft.com/en-us/graph/api/resources/onedrive?view=graph-rest-1.0)"
				}
			],
			"description": "## Delegated Permissions\n\nBefore the Microsoft identity platform can authorize your app to access data through Microsoft Graph, the app must be granted the privileges that it needs.\n\nOne way to grant an app the privileges it needs to access and work with your data through Microsoft Graph is by assigning it Microsoft Graph permissions.\n\nThis folder contains the APIs that require [delegated](https://learn.microsoft.com/en-us/graph/permissions-overview?tabs=http#delegated-permissions) permissions. They're permissions that allow the application to act on behalf of a signed-in user.\n\n# To Get Started\n\nYou will need to set up delegated authorization for this folder. Go to the folder Delegated > Set up delegated authentication to follow the step-by-step guide to run your first delegated request.\n\nAfter your application is authenticated, you can decide which Microsoft Graph [permissions](https://learn.microsoft.com/en-us/graph/permissions-overview?tabs=http) to add to your Azure Active Directory application based on the access scenario and the operations you want to perform.\n\nTo find the right permissions, check the Permissions section of the relevant [API reference ](https://learn.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0&preserve-view=true) page and look for the delegated permission type.",
			"auth": {
				"type": "oauth2",
				"oauth2": [
					{
						"key": "redirect_uri",
						"value": "https://oauth.pstmn.io/v1/callback",
						"type": "string"
					},
					{
						"key": "useBrowser",
						"value": false,
						"type": "boolean"
					},
					{
						"key": "state",
						"value": "",
						"type": "string"
					},
					{
						"key": "scope",
						"value": "https://graph.microsoft.com/.default",
						"type": "string"
					},
					{
						"key": "tokenType",
						"value": "",
						"type": "string"
					},
					{
						"key": "accessToken",
						"value": "",
						"type": "string"
					},
					{
						"key": "client_authentication",
						"value": "header",
						"type": "string"
					},
					{
						"key": "grant_type",
						"value": "authorization_code",
						"type": "string"
					},
					{
						"key": "tokenName",
						"value": "Delegated Token",
						"type": "string"
					},
					{
						"key": "clientSecret",
						"value": "{{ClientSecret}}",
						"type": "string"
					},
					{
						"key": "clientId",
						"value": "{{ClientID}}",
						"type": "string"
					},
					{
						"key": "authUrl",
						"value": "https://login.microsoftonline.com/{{TenantID}}/oauth2/v2.0/authorize",
						"type": "string"
					},
					{
						"key": "accessTokenUrl",
						"value": "https://login.microsoftonline.com/{{TenantID}}/oauth2/v2.0/token",
						"type": "string"
					},
					{
						"key": "addTokenTo",
						"value": "header",
						"type": "string"
					}
				]
			},
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				},
				{
					"listen": "test",
					"script": {
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				}
			]
		},
		{
			"name": "Application",
			"item": [
				{
					"name": "SharePoint",
					"item": [
						{
							"name": "Get sites",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"try {\r",
											"    if (responseBody.indexOf(\"InvalidAuthenticationToken\") !== -1)\r",
											"    {\r",
											"        console.log(\"Go to the Application folder > Authorization tab > scroll down and click on Get New Access Token button.\");\r",
											"    }\r",
											"    else\r",
											"    {\r",
											"        if (pm.environment.get(\"UserId\") === \"\")\r",
											"        {\r",
											"            console.log(\"You need to run *Application | Get Users* request first or set a UserId environment variable.\");\r",
											"        }\r",
											"        else\r",
											"        {\r",
											"            if (pm.response.status === \"Forbidden\")\r",
											"            {\r",
											"                console.log(\"You need to add application permissions in your application to atleast *Mail.Read.All* in portal.azure.com and then consent as user or Grant admin consent in portal. Then, go to the Application folder > Authorization tab > scroll down and click on Get New Access Token button. \");\r",
											"            }\r",
											"            else\r",
											"            {\r",
											"                if (responseBody.indexOf(\"ResourceNotFound\") !== -1)\r",
											"                {\r",
											"                    console.log(\"You need to pick a UserId who has a license for a mailbox.\");\r",
											"                }\r",
											"                else\r",
											"                {\r",
											"                    var json = JSON.parse(responseBody);\r",
											"                    postman.setEnvironmentVariable(\"MessageId\", json.value[0].id);\r",
											"                }\r",
											"            }\r",
											"        }\r",
											"    }\r",
											"}\r",
											"catch (e) {\r",
											"    console.log(e);\r",
											"}\r",
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json",
										"name": "Content-Type",
										"type": "text"
									},
									{
										"key": "Prefer",
										"value": "apiversion=2.1",
										"type": "text"
									}
								],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites"
									]
								}
							},
							"response": []
						},
						{
							"name": "Get drives",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites/{{SiteID}}/drives",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites",
										"{{SiteID}}",
										"drives"
									]
								}
							},
							"response": []
						},
						{
							"name": "Get sites root",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites/root",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites",
										"root"
									]
								}
							},
							"response": []
						},
						{
							"name": "Get drive",
							"request": {
								"method": "GET",
								"header": [],
								"url": {
									"raw": "https://graph.microsoft.com/v1.0/sites/{{SiteID}}/lists/166df55a-8e19-4ab7-9cc5-d2722733d694?expand=columns,items(expand=fields)",
									"protocol": "https",
									"host": [
										"graph",
										"microsoft",
										"com"
									],
									"path": [
										"v1.0",
										"sites",
										"{{SiteID}}",
										"lists",
										"166df55a-8e19-4ab7-9cc5-d2722733d694"
									],
									"query": [
										{
											"key": "expand",
											"value": "columns,items(expand=fields)"
										}
									]
								}
							},
							"response": []
						}
					],
					"description": "This folder contains app-only requests around accessing an organizations SharePoint sites and associated drives.\n\nTo learn more, see:\n\n- [Working with SharePoint sites in Microsoft Graph - Microsoft Graph v1.0 | Microsoft Learn.](https://learn.microsoft.com/en-us/graph/api/resources/sharepoint?view=graph-rest-1.0)"
				}
			],
			"description": "## Application Permissions\n\nBefore the Microsoft identity platform can authorize your app to access data through Microsoft Graph, the app must be granted the privileges that it needs.\n\nOne way to grant an app the privileges it needs to access and work with your data through Microsoft Graph is by assigning it Microsoft Graph permissions.\n\nThis folder contains the APIs that require [application](https://learn.microsoft.com/en-us/graph/permissions-overview?tabs=http#application-permissions) permissions. They're permissions that allow the application to act with its own identity, without a signed-in user present.\n\n# To Get Started\n\nYou will need to set up app-only authorization for this folder. Click [here ](https://www.postman.com/microsoftgraph/workspace/microsoft-graph/folder/455214-1db05515-e045-482a-8d70-9eb21b651c0b) to follow the step-by-step guide to run your first app-only request.\n\nAfter your application is authenticated, you can decide which Microsoft Graph [permissions](https://learn.microsoft.com/en-us/graph/permissions-overview?tabs=http) to add to your Azure Active Directory application based on the access scenario and the operations you want to perform.\n\nTo find the right permissions, check the Permissions section of the relevant [API reference](https://learn.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0&preserve-view=true) page and look for the delegated permission type.",
			"auth": {
				"type": "oauth2",
				"oauth2": [
					{
						"key": "tokenType",
						"value": "",
						"type": "string"
					},
					{
						"key": "accessToken",
						"value": "",
						"type": "string"
					},
					{
						"key": "useBrowser",
						"value": true,
						"type": "boolean"
					},
					{
						"key": "tokenName",
						"value": "Application Token",
						"type": "string"
					},
					{
						"key": "challengeAlgorithm",
						"value": "S256",
						"type": "string"
					},
					{
						"key": "scope",
						"value": "https://graph.microsoft.com/.default",
						"type": "string"
					},
					{
						"key": "redirect_uri",
						"value": "https://app.getpostman.com/oauth2/callback",
						"type": "string"
					},
					{
						"key": "grant_type",
						"value": "client_credentials",
						"type": "string"
					},
					{
						"key": "clientSecret",
						"value": "{{ClientSecret}}",
						"type": "string"
					},
					{
						"key": "clientId",
						"value": "{{ClientID}}",
						"type": "string"
					},
					{
						"key": "authUrl",
						"value": "https://login.microsoftonline.com/{{TenantID}}/oauth2/v2.0/authorize",
						"type": "string"
					},
					{
						"key": "addTokenTo",
						"value": "header",
						"type": "string"
					},
					{
						"key": "client_authentication",
						"value": "header",
						"type": "string"
					},
					{
						"key": "accessTokenUrl",
						"value": "https://login.microsoftonline.com/{{TenantID}}/oauth2/v2.0/token",
						"type": "string"
					}
				]
			},
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				},
				{
					"listen": "test",
					"script": {
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				}
			]
		},
		{
			"name": "v1.0 $metadata",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json;odata.metadata=full"
					}
				],
				"url": {
					"raw": "https://graph.microsoft.com/v1.0/$metadata",
					"protocol": "https",
					"host": [
						"graph",
						"microsoft",
						"com"
					],
					"path": [
						"v1.0",
						"$metadata"
					]
				}
			},
			"response": []
		},
		{
			"name": "beta $metadata",
			"request": {
				"method": "GET",
				"header": [
					{
						"key": "Accept",
						"value": "application/json;odata.metadata=full"
					}
				],
				"url": {
					"raw": "https://graph.microsoft.com/beta/$metadata",
					"protocol": "https",
					"host": [
						"graph",
						"microsoft",
						"com"
					],
					"path": [
						"beta",
						"$metadata"
					]
				}
			},
			"response": []
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"requests": {},
				"exec": [
					"if(!pm.request.headers.find(\"SdkVersion\")) {",
					"    pm.request.headers.add({key: \"SdkVersion\", value: \"postman-graph/v2.0\"});",
					"}"
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"requests": {},
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "TenantID",
			"value": ""
		},
		{
			"key": "ClientID",
			"value": ""
		},
		{
			"key": "ClientSecret",
			"value": ""
		},
		{
			"key": "SiteID",
			"value": ""
		},
		{
			"key": "DriveID",
			"value": ""
		}
	]
}