question

UnverzagtMarko-9801 avatar image
0 Votes"
UnverzagtMarko-9801 asked saldana-msft edited

Error 403 on create element with sites.selected permission

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.

office-sharepoint-online
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MichaelHan-MSFT avatar image
1 Vote"
MichaelHan-MSFT answered

Hi @UnverzagtMarko-9801,

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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

UnverzagtMarko-9801 avatar image
0 Votes"
UnverzagtMarko-9801 answered

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

jacobsteentoft avatar image
0 Votes"
jacobsteentoft answered

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?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.