I created a AzureAD native client app which uses ADAL with UserCredentials (It will eventually be a headless multi-tenant windows service which is why I'm trying to use user credentials instead of other flows) to authenticate to AzureAD. This app communicates with a multi-tenant WebApi. I can run the app fine when using an active directory user which owns the app or even with user from a different directory within the same tenant. However, if I use a user from a completely different tenant I get the following:
Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException occurred Message: Exception thrown: 'Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException' in Microsoft.IdentityModel.Clients.ActiveDirectory.dll Additional information: AADSTS65001: No permission to access user information is configured for '******-****-****-****-************' application, or it is expired or revoked.
The client ID returned is the same ID that was assigned to the native client app when it was registered in same tenant as the WebApi.
It sounds like this tenant needs explicit permission to access the native client app. For now this is just a test app, so it's not in the gallery. I can't see a way to add a native client app created by one tenant to a different tenant. At least not without adding it to the gallery if that's even possible.
- Are native client app's supported in the Gallery?
- Is there a way to register a native client app in a tenant other then owner of app without publishing the app to the gallery?