Share via

Create site permission -graph api throws "Access Denied"

Nick 20 Reputation points
2023-04-12T18:04:18.64+00:00

Hi, I have registered an Azure app and I want to use Microsoft Graph API to allow app to connect to SharePoint site collection and read / write files in specific location. I have granted the Site.Selected, as we want to restrict the access of this app only to this site. The issue is when I try to create permission for the site in Graph explorer returns "Access denied". POST /sites/{sitesId}/permissions

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments

Answer accepted by question author

Anonymous
2023-04-12T18:19:14.69+00:00

Hi Nick,

Thanks for reaching out!

As per the documentation to create site permission "Sites.FullControl" permission is required and "Graph API - POST https://graph.microsoft.com/v1.0/sites/{sitesId}/permissions, does not support delegated permissions. It only supports Application permissions." Reference document: https://learn.microsoft.com/en-us/graph/api/site-post-permissions?view=graph-rest-1.0&tabs=http#permissions

Hope this helps.

If the reply is helpful, please click "Accept Answer" and kindly upvote it. If you have additional questions about this answer, please click "Comment".

Was this answer helpful?

0 comments No comments

9 additional answers

Sort by: Most helpful
  1. 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.


    Comments have been turned off. Learn more

  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.


    Comments have been turned off. Learn more

  3. 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.

    2 deleted comments

    Comments have been turned off. Learn more

  4. 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.


    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.