Sql Surfer
Sql Surfer

Reputation: 1422

graph.microsoft.com Beta Fails but Production Works

I have a production (normal) graph.microsoft.com app working perfectly.

When I try to use the beta url it fails at the authorization level. It behaves as though my app registration is not in my tenant when I reference the beta endpoint https://graph.microsoft.com/beta/ .

It is like I have to do something special to get my app registration to work on the beta side of graph.microsoft.com

This is an application – not a delegated user.

    //Works – Production 
       AuthenticationContext(https://login.microsoftonline.com/{MyTenantGuid}/v2.0)
       ClientCredential({appIdGuid},{appSecret}) 
       AuthenticationContext.AcquireTokenAsync(https://graph.microsoft.com/, ClientCredential)   

    //Fails – Beta 
       AuthenticationContext(https://login.microsoftonline.com/{MyTenantGuid}/v2.0)
       ClientCredential({appIdGuid},{appSecret}) 
       AuthenticationContext.AcquireTokenAsync(https://graph.microsoft.com/beta/, ClientCredential) 
   // solution... the above line should not have "beta" in it

The beta error happens during AcquireToken … The actual error text from the beta end point is this …

AADSTS50001: The application named https://graph.microsoft.com/beta was not found in the tenant named {MyTenantGuid}

I am just wondering if there is something I have to do special to access the beta side since my normal https://graph.microsoft.com/v1.0/ works as expected during the token phase.

Solution was ... BETA and Regular v1.0 Are the Same for Token Acquisition You do not put the word beta in the resource for beta token fetches. Thank you Mark for your answer

Upvotes: 0

Views: 184

Answers (1)

Marc LaFleur
Marc LaFleur

Reputation: 33124

The /v1.0 and /beta paths are related to the Microsoft Graph API itself, not the authentication service. Both endpoints use the same tokens and set of scopes.

For example, the same token will work if you call https://graph.microsoft.com/v1.0/me or https://graph.microsoft.com/beta/me.

Upvotes: 2

Related Questions