I have created an Azure app registration and granted SharePoint Sites.Selected access. I have granted access to a site via graph API for the application. I am unable to connect to the site or any files under the site via the application graph connection POST below. I have also done a GET permissions to confirm they are applied.
POST https://graph.microsoft.com/v1.0/sites/SiteName/permissions { "roles": [ "write" ], "grantedToIdentities": [ { "application": { "id": "4a0f379e-5a5f-490f-9703-51e5d5d8d73d", "displayName": "LV" } } ] }
Still unable to connect to GET the site GET https://graph.microsoft.com/v1.0/sites/tenant.sharepoint.com:/sites/SiteName
Error: { "error": { "code": "accessDenied", "message": "Access denied", "innerError": { "date": "2021-07-20T18:24:18", "request-id": "7673c6bb-9245-4a33-9c56-febb495b1a47", "client-request-id": "7673c6bb-9245-4a33-9c56-febb495b1a47" } } }