Graph API: Sites Selected
To setup granular permissions for the middleware application you will need to create an azure application that already has the permission Sites.Selected with admin consent granted. (See the below screenshot to setup granular permissions for the middleware application. You will need to create an azure application that already has the permission Sites.Selected with admin consent granted.)
Once that is completed we will use the graph explorer to give permissions to our azure application for the selected site.
- In the URL input for query enter the following https://graph.microsoft.com/beta/sites/<hostname>:/sites/<site-name> (See example below) and click run query. **subsites are not supported
- In the response object copy the highlighted value under "id".
(This is different for each tenant and site do not copy the sample site id provided in the screenshot)
- In URL input for query enter the following and run the following query.
You may recieve a 403 forbidden access response. If so click modify response and consent the permissions
- Change the request from a GET to POST. Click request body tab and modify the following json object sample below with the applicable azure application id and display name for your organization. (You can get the azure app id and display name from the overview page of the azure application).
Below is a screenshot if the permissions have been setup successful.