How to access resource's calendar outside my organization through EWS?

Moin Uddin Kashif 1 Reputation point

I have an Android application which was using Basic authentication for Microsoft 365 (username, password and URL= I was using EWS to get the calendar of the signed in user to display the events from his calendar.
With new changes in the MS authentication I have to use OAuth for the authentication. I have registered my app in Azure portal and got the tenant and client IDs.
I am able to authenticate the user in my organization but how can I authenticate the user (which is not in my organization) so he can display his calendar in my app.

For example
My organization :
Signed user :
Customer’s resource: resource1@itservices .com (which they want to use in our app to display the calendar’s events)

For the authentication I am using the information from Azure portal for my registered app
Client ID: 5666989b-xxxxxx-xxxxxx-xxxx-xxxxxxxxx
Tenant ID:
Password: xxxxxxxxx
This works fine if I use "" but if I use "user1@itservices .com" then it gave me an error "AADSTS65001: The user or administrator has not consented to use the application with ID '5666989b-xxxxxx-xxxxxx-xxxx-xxxxxxxxx' named 'Schedule display'. Send an interactive authorization request for this user and resource."

I have enabled the Delegate permission in the API permissions in Azure, but it didn't solve the problem.
What should I do?


Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
18,612 questions
{count} votes