2017-09-23 49 views
0

我有一個生產(正常)graph.microsoft.com應用程序完美工作。graph.microsoft.com Beta失敗,但生產工作

當我嘗試使用beta url時,它在授權級別失敗。它表現得好像我參考測試端點https://graph.microsoft.com/beta/時我的應用程序註冊不在我的租戶中。

它就像我必須做一些特別的東西讓我的應用程序註冊到graph.microsoft.com

這的測試方共同努力是一個應用程序 - 而不是委派的用戶。 AcquireToken過程中會發生

//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 

貝塔錯誤... 從公測結束點實際的錯誤的文字是這樣的......

AADSTS50001:命名https://graph.microsoft.com/beta應用程序名爲{MyTenantGuid}承租人未找到

我只是想知道是否有什麼東西我必須做特殊的訪問測試版,因爲我的正常https://graph.microsoft.com/v1.0/按預期在令牌階段工作。

溶液... BETA和定期V1.0是相同的令牌獲取 你不把這個詞公測的資源用於測試令牌獲取。 謝謝您的回答標記爲

回答

2

/v1.0/beta路徑與Microsoft Graph API本身相關,而不是與驗證服務相關。兩個端點都使用相同的令牌和一組範圍。

例如,如果您致電https://graph.microsoft.com/v1.0/mehttps://graph.microsoft.com/beta/me,則可以使用相同的標記。