How to access resource's calendar outside my organization through EWS?
I have an Android application which was using Basic authentication for Microsoft 365 (username, password and URL=https://outlook.office365.com/ews/Exchange.asmx). 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.
My organization : scheduledisplay.com
Signed user : firstname.lastname@example.org
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: scheduledisplay.com
This works fine if I use "email@example.com" 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?
@Moin Uddin Kashif I wanted to follow up and know if the above response helped in answering your query. If it did, please accept the appropriate response as answer for the benefit of community. If it did not, please let us know so that we can help you further.
Sign in to comment