Error 403 on create element with sites.selected permission

Unverzagt, Marko 21 Reputation points
2021-06-29T11:14:51.767+00:00

Hello,
i have an app registration in AAD with app delegated graph api permission Sites.Selected. In Sharepoint i added role "Write" to these app. I tested if i could update an element in a list and it works. But if i try to create a new element with the same token i get an 403 error. Then i set permission to Sites.FullAccess.All and it works. Does it mean that Sites.Selected with role Write can't create elements in a list?
I test also if the given body and url are right in graph explorer. With my admin credentials it works. So the problem is just the permission i think.
Thank you for your answers.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,849 questions
0 comments No comments
{count} votes

Accepted answer
  1. MichaelHan-MSFT 18,016 Reputation points
    2021-06-30T07:03:00.593+00:00

    Hi @Unverzagt, Marko ,

    I got the same results as yours on my end. Both update and delete ListItem operations would work for the AAD app with Sites.Selected permission (added role write). Only create operation would not work. I even added role "manage" or "fullcontrol" for the app. Sitill create operation would not work.

    I believe it's a bug for Sites.Selected permissions.

    I submitted this issue in github: https://github.com/microsoftgraph/microsoft-graph-docs/issues/13334


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Unverzagt, Marko 21 Reputation points
    2021-07-03T06:31:04.587+00:00

    Hello @MichaelHan-MSFT ,
    thank you for your validation and the bug report.
    Happy weekend

    0 comments No comments

  2. Jacob Steentoft 1 Reputation point
    2021-08-04T09:59:04.177+00:00

    Hi @MichaelHan-MSFT ,

    I tried adding to the GitHub issue as well but seems like we're back to Microsoft QnA.

    Do you have any suggestions for making sure that this problem gets flagged to the right department/place?

    0 comments No comments