Grant admin consent for Sites.Selected for the selected app

Jyoti Jain 0 Reputation points
2025-11-25T12:26:43.49+00:00

We would like to grant admin consent for the selected app to run a python script where it will extract the raw data from Matomo and store at sharepoint. But we are not able to grant admin consent. Not able to see any kind of button or message to provide the access. Please explain why and how to solve this? User's image

Microsoft Security | Microsoft Entra | Microsoft Entra ID

2 answers

Sort by: Most helpful
  1. Billy Peralta 0 Reputation points
    2026-11-20T07:18:48.0266667+00:00

    Hi Jyoti,

    Sites.Selected requires two separate steps.

    1. Grant admin consent

    In the Entra admin center, go to App registrations > your app > API permissions.

    For Microsoft Graph application permissions, ask a Privileged Role Administrator or Global Administrator to grant consent if you don't have the required privileges.

    2. Grant access to the specific SharePoint site

    Sites.Selected alone doesn't give the app access to any site.

    An authorized administrator can grant access using the Microsoft Graph API or PnP PowerShell:

    Grant-PnPEntraIDAppSitePermission `
        -AppId "<app-id>" `
        -DisplayName "<app-name>" `
        -Site "<site-url>" `
        -Permissions Write
    

    This requires an authenticated PnP connection with the delegated Microsoft Graph Sites.FullControl.All permission and sufficient administrative rights.

    Use Read instead of Write if the app doesn't need to modify files.

    Your application's Sites.Selected permission can then be limited to the approved site. Make sure the app doesn't also have broader SharePoint permissions.

    Microsoft references:

    PnP command documentation

    Was this answer helpful?

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.