question

AgrouAbdelkrime-0375 avatar image
0 Votes"
AgrouAbdelkrime-0375 asked AgrouAbdelkrime-0375 commented

Grant_type=client_credentials doesn't work for exchange 2016 on premise (error 401 Unauthorized)

Hello,

Grant_type=client_credentials doesn't work for exchange 2016 on premise, for exchange online works perfect but for on promise i got 401 error 401 Unauthorized UnknownError.

https://graph.microsoft.com/v1.0/users/xxxx@xxx.com/calendar

Could you please help to solve this issue?

Regards,
AAgrou

microsoft-graph-calendar
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.

1 Answer

ShwetaChoudhary-8869 avatar image
0 Votes"
ShwetaChoudhary-8869 answered AgrouAbdelkrime-0375 commented

Thank you for reaching out.

Now you can use Microsoft Graph/REST APIs in hybrid deployments (currently in preview). With Exchange 2016 Cumulative Update 3 (CU3), released in September 2016 for Exchange on-premises servers, adds support for REST API integration with Microsoft 365.

  • If your app uses v1.0 of the Mail, Calendar, or Contacts API, you will now also find a seamless authentication and application experience in hybrid deployments, regardless of whether the mailbox is on-premises or in the cloud, provided that the deployment meets specific requirements.


  • Only v1.0 of the Mail, Calendar, and Contacts API are available for mailboxes in hybrid deployments. For more info, please refer here.

If you meet all the requirements and still facing issues, do reach out providing details of an API call including Client-request-id and timestamp.

Thanks.



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

Thanks,
We checked all the prerequisites, but still not working for on premise servers.
Could you please help.
Regards,
AAgrou

0 Votes 0 ·

Do share details of an API call including Client-request-id and timestamp.

0 Votes 0 ·

{
Hello ShwetaChoudhary,

Thanks for your help, below the details :
Requsest:
https://graph.microsoft.com/v1.0/users/xxxxx@tt.com/calendars

Response:
401 Unauthorized
"error": {
"code": "UnknownError",
"message": "",
"innerError": {
"date": "2021-09-10T12:25:37",
"request-id": "f7661d80-2adb-4333-a2b7-c34dafe92eae",
"client-request-id": "f7661d80-2adb-4333-a2b7-c34dafe92eae"
}
}
}

0 Votes 0 ·