Skip to content

Microsoft Graph Explorer Setup

Role: IT administrator. Use this browser workflow after creating your Entra app and consenting to its Sites.Selected Application permission. You need the app’s Client ID and the approved SharePoint site URL. Do not enter the Client Secret into Graph Explorer.

Section titled “1. Sign in and consent to administrator permissions”
  1. Open Microsoft Graph Explorer.
  2. Select Sign in and use your work administrator account in the intended tenant. Unsigned sample mode does not operate on your tenant.
  3. Use an account with SharePoint Administrator or higher, with any required privileged role activated.
  4. Set the API version to v1.0. Use the method selector, request URL, and Run query for the requests below.
  5. For site/library discovery, consent to delegated Sites.Read.All. For permission inspection and creation, use Modify permissions, or your profile’s Consent to permissions, to consent to delegated Sites.FullControl.All. Have the authorized tenant consent approver complete this if your account cannot.
  6. After consent, retry the request; sign in again if the session has not acquired the updated scope. If the tenant blocks Graph Explorer, have IT approve it through the normal tenant process.
Identity Permission Purpose
Signed-in administrator in Graph Explorer Delegated Sites.FullControl.All, with administrator role Inspect/manage site application grants
Customer-owned runtime app used by HighLevel Application Sites.Selected, plus explicit site grants Execute workflows against authorized sites

Microsoft’s create-permission reference and list-permissions reference document Sites.FullControl.All for these management requests.

Do not infer that Sites.ReadWrite.All alone is sufficient from a successful existing session: previously consented scopes may also be present. Microsoft explains the consent controls in its Graph Explorer guide.

Choose GET and paste this endpoint pattern:

GET https://graph.microsoft.com/v1.0/sites/{hostname}:/{relative-site-path}?$select=id,displayName,webUrl

For the fictional site https://contoso.sharepoint.com/sites/Retail:

GET https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com:/sites/Retail?$select=id,displayName,webUrl

Select Run query. Expect 200 OK and a site object, for example:

{
"id": "contoso.sharepoint.com,00000000-0000-4000-8000-000000000001,00000000-0000-4000-8000-000000000002",
"displayName": "Retail",
"webUrl": "https://contoso.sharepoint.com/sites/Retail"
}

Copy the entire id, including both commas. It combines hostname, site-collection ID, and site/web ID. Below, replace {SITE-ID} with that complete value, without braces. Confirm displayName and webUrl identify the site you intend to authorize. See Microsoft’s site-by-path reference.

For site resolution, Microsoft lists delegated Sites.Read.All. Library discovery lists Files.Read as its least delegated scope and Sites.Read.All among its supported higher scopes. These endpoint permissions differ from the elevated site-grant management scope above; do not change the runtime app to match a Graph Explorer discovery request.

GET https://graph.microsoft.com/v1.0/sites/{SITE-ID}/permissions

Expect 200 OK with a value array. In each permission, compare application.id under grantedToIdentitiesV2 with your app’s Application (client) ID. Older responses may also include grantedToIdentities. The application display name alone is not proof of identity.

  • Matching Client ID and correct role: keep the existing grant and skip creation.
  • No matching Client ID: create the grant in step 4.
  • Matching Client ID with a different role, or duplicate matches: have the site administrator review the existing permission. Do not POST another grant to change its role.

If @odata.nextLink is returned, follow it to inspect all pages before deciding that a grant is missing. Use the full returned HTTPS Microsoft Graph URL.

Choose POST. Set the request header Content-Type: application/json and use:

POST https://graph.microsoft.com/v1.0/sites/{SITE-ID}/permissions

In Request body, paste the JSON below. Replace the Client ID label with your app’s actual Client ID; leave the rest as valid JSON.

{
"roles": ["write"],
"grantedToIdentities": [
{
"application": {
"id": "YOUR-APPLICATION-CLIENT-ID",
"displayName": "Microsoft 365 Files for HighLevel"
}
}
]
}

Use write for create/upload/move/rename/delete and find-or-create workflows. Use read only when every intended workflow is read-only. Review the site and Client ID, then select Run query. Expect 201 Created with the new permission.

This POST creates an application grant. It does not create a user site permission, and it does not grant tenant-wide access.

GET https://graph.microsoft.com/v1.0/sites/{SITE-ID}/permissions

Confirm the correct Client ID and roles value, for example:

{
"value": [
{
"id": "example-permission-id",
"roles": ["write"],
"grantedToIdentitiesV2": [
{
"application": {
"id": "YOUR-APPLICATION-CLIENT-ID",
"displayName": "Microsoft 365 Files for HighLevel"
}
}
]
}
]
}

6. List document libraries and prepare the handoff

Section titled “6. List document libraries and prepare the handoff”
GET https://graph.microsoft.com/v1.0/sites/{SITE-ID}/drives?$select=id,name,webUrl,driveType

Expect 200 OK. Follow Generate your Drive ID map to read the response, follow pagination, and prepare the non-secret Site | Library | Drive ID table.

Transfer Tenant ID and Client ID as configuration, and the Client Secret separately through your organization’s approved secure method. Continue to configure HighLevel and run the first action.

Result Check
401 Sign-in, intended tenant, and fresh Graph Explorer session
403 inspecting/creating grants Delegated Sites.FullControl.All consent, administrator role, tenant policy
404 resolving the site Hostname and relative path; remove library/folder suffixes from the site URL
400 on POST JSON syntax, actual application Client ID, complete composite Site ID

After the setup session, sign out. Have IT review Graph Explorer’s elevated consent under the organization’s access policy; signing out does not itself revoke tenant consent.

Next: Generate your Drive ID map →