0
votes

I am developing UWP application, in that I used the AAD authentication for security after user login successfully then I am trying to call O365 API with my accestoken for to getting calendar events of authorized user.

Up to now it’s working fine, but I was enabled the “Application is multi-tenant” option in AAD after that I used different tenant AAD user credentials to sign into the application. After successful sign in, when I am trying to call O365 API with new tenant credentials then I got the exception like “Unauthorized”.

Please tell me, if it is possible or not for different tenant users can access their respective O365 calendar events from a single tenant AAD application(multi-tenant enabled app)?

-Pradeep

1

1 Answers

0
votes

When you switch to MultiTenant the new tenancy needs to go through the authorize / permissions granting again? (I'm not an expert, but I'm developing a similar app)

"Step 6: [optional] Create an Azure Active Directory test tenant

This sample shows how to take advantage of the consent model in Azure AD to make an application available to any user from any organization with a tenant in Azure AD. To see that part of the sample in action, you need to have access to user accounts from a tenant that is different from the one you used for developing the application. The simplest way of doing that is to create a new directory tenant in your Azure subscription (just navigate to the main Active Directory page in the portal and click Add) and add test users. This step is optional as you can also use accounts from the same directory, but if you do you will not see the consent prompts as the app is already approved."

https://azure.microsoft.com/en-gb/documentation/samples/active-directory-dotnet-webapp-multitenant-openidconnect/