OfficeDev / office-js-helpers

[ARCHIVED] A collection of helpers to simplify development of Office Add-ins & Microsoft Teams Tabs
MIT License
126 stars 56 forks source link

Is there anything difference settings between Azure AD only App and Converaged App? #64

Closed mvpkenlin closed 6 years ago

mvpkenlin commented 6 years ago

Under Application Registration Portal, there are 2 types of applications, converaged app and Azure AD only app.

I followed the steps and successfully get the token from the app in "converaged app" type. However the same code same settings, it does not work when the app in "Azure AD only applications" type. The returned error when calling the authenticator.authenticate method is,

AADSTS90130 : Application'[My App ID]' ([My App Name]) is not supported over the /common or /consumers endpoints. Please use the /organizations or tenant-specific endpoint.

I also tried to use the Azure AD by adding the following to authenticator.endpoints.registerMicrosoftAuth, but it does not work too and the new error is

baseUrl: "https://login.microsoftonline.com/[My Tenant ID]/oauth2"

Error Message is: AADSTS50001 : Resource identifier is not provided.

WrathOfZombies commented 6 years ago

Sorry for the late response, I think for the coverged app you are encourage to use the Microsoft Authentication flow instead of the Azure AD flow.

And within the Microsoft authentication flow, you can override the baseUrl to include your tenantId.

mvpkenlin commented 6 years ago

I am sorry for the late reply too. I mean, I can pass the authentication if my app is registered in "Converaged app" Type in development environment.

But the application in production environment actually is "Azure AD only" type and I cannot pass the authentication. What could I do?