I have a client application which runs as daemon mode [no interfaces]. This daemon will speak to app created in Azure (single-tenant currently) to fetch users using O365 Graph API. Authentication mechanism used is Auth2 certificate/thumbprint. Permission to app is given directly by admin while creating app in azure itself.
Now i need to make this daemon (client) and app in azure as multi tenant. Things i followed after reading some articles
- Mark app as multi-tenant in azure
- Point to /common in token url in client (which runs as daemon) https://login.microsoftonline.com/common/oauth2/token.
Questions:
After this i was able to get access token , but for any query i make i am getting error "The identity of the calling application could not be established".
Since there is no user intervention here , how do i give permission for tenant B app to access tenant A's data like users in my case ? Anything i can do in manifest file
If tenant B's app is accessing tenant's A data , should both app in azure be mutlitenant ?
Lot of articles explains how is the flow based on user login (user consent). But my client application runs as daemon. How do i give permission directly/mechanism in azure app for accessing other tenant's data ? [Assume i am admin of both tenants and i have complete access to both tenant]