我有一个 生产环境 (正常)graph.microsoft.com应用程序完美的工作 .
当我尝试使用beta网址时,它在授权级别失败 . 当我引用beta endpoints https://graph.microsoft.com/beta/时,它的行为就好像我的应用注册不在我的租户中 .
这就像我必须做一些特别的事情才能使我的应用注册工作在graph.microsoft.com的beta方面
这是一个应用程序 - 而不是委派用户 .
//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
在AcquireToken期间发生beta错误...来自beta终点的实际错误文本是这个......
AADSTS50001:在名为的租户中找不到名为https://graph.microsoft.com/beta的应用程序
我只是想知道是否有一些我必须做的特殊的访问beta方面,因为我的正常https://graph.microsoft.com/v1.0/在令牌阶段期间按预期工作 .
Solution was ... BETA and Regular v1.0 Are the Same for Token Acquisition 您没有在测试用例中提取beta标记 . 谢谢马克的回答
1 回答
/v1.0
和/beta
路径与Microsoft Graph API本身相关,而不是与身份验证服务相关 . 两个 endpoints 都使用相同的标记和范围集 .例如,如果调用
https://graph.microsoft.com/v1.0/me
或https://graph.microsoft.com/beta/me
,则相同的标记将起作用 .