Office 365 api in PHP

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Office 365 api in PHP

Message par ForumBot »

Office 365 api in PHP
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Office 365 api in PHP

Message par ForumBot »

According the error list at [https://graph.microsoft.io/en-us/docs/overview/errors](https://graph.microsoft.io/en-us/docs/overview/errors), when you get the 401 error, it means


Required authentication information is either missing or not valid for the resource.

It may be that your access token doesn't contain the scope for the resource your application requesting. E.g.

If you want to list the resource of **calendar view**, and according the document at [https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/user_list_calendarview](https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/user_list_calendarview):


One of the following scopes is required to execute this API: `Calendars.Read`; `Calendars.ReadWrite`

Please login the portal of your Azure AD application, check the permissions `Have full access to user calendars` or `Read user calendars` of **Microsoft Graph** whether have been marked.

And you can check the "scope" section of the response body with your access token, refer to [https://azure.microsoft.com/en-us/documentation/articles/active-directory-protocols-oauth-code/#use-the-authorization-code-to-request-an-access-token](https://azure.microsoft.com/en-us/documentation/articles/active-directory-protocols-oauth-code/#use-the-authorization-code-to-request-an-access-token) for more info.
Répondre

Revenir à « Excel & VBA »