When trying to make a folder in SharePoint site I get the following error:
{
"error": {
"code": "accessDenied",
"message": "Access denied",
"innerError": {
"request-id": "61d3b5aa-857e-4ee2-9d0d-51d235ca7c5f",
"date": "2020-05-18T06:31:54"
}
}
}
Notes:
- When using the Microsoft Graph Explorer, the request works.
- Other requests to Graph endpoints work.
- I used
msgraph-sdk-php
to make requests. This usually has to do with permissions, but my user has the following permissions set in azure:
Sites.Manage.All Delegated. Sites.Read.All Delegated. Sites.ReadWrite.All Delegated.
inside my.env I have the following permissions:
OAUTH_SCOPES='openid profile offline_access user.read calendars.readwrite mail.readwrite mail.send'
Url:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?%20state={someState}%20&scope=openid%20profile%20offline_access%20user.read%20calendars.readwrite%20mail.readwrite%20mail.send%20&response_type=code&approval_prompt=auto&redirect_uri=http://localhost:8080/office365/token/store%20&client_id={myclientId}
What causes an error here?