How can I access Azure Graph AND Microsoft Graph using same OAuth2 token?

Viewed 1159

I want to access both the Azure AD Graph API and the Microsoft Graph API using the same OAuth2 token (in a Swift 3 application for iOS) - is this possible?

I want to access the following APIs:

I have created a Native application in the Azure Portal and added permissions for both Microsoft Graph and Microsoft.Azure.ActiveDirectory (with the above permission scopes).

I can access both APIs by only changing the resource property when authenticating (on login) - the Azure configuration seems correct. But I get an "Unauthorized" error when trying to use the same token to access the other API when authentication using the first resource. I have tried to add both URL to the resource property but then I get an error ("AADSTS50001: The application name was not found in the tenant."). What am I doing wrong or what am I missing...?

If it's not possible - why is it then possible to add multiple APIs in the Azure Portal?

Reason for accessing both APIs: Microsoft Graph doesn't give me all properties (but support delta changes) and Azure AD Graph gives me the full profile - both without the admin consent (using delegated permissions)

2 Answers
Related