AzureAD 错误信息Access token validation failure

时间:2022-12-09 20:35:04
AzureAD 错误信息Access token validation failure



遇到这个错误通常说明你使用的graph.windows.net(azure AD graph)获取的token来访问Graph.microsoft.com(microsoft graph)的资源。而且graph.windows.net api已经不推荐使用了,资源访问都可使用azure AD graph api来替代。详情:https://blogs.msdn.microsoft.com/aadgraphteam/2016/07/08/microsoft-graph-or-azure-ad-graph/




另外就是关于microsoft graph的实例代码还没有找到,但是可以使用azure AD graph的实例来获取token,只要把资源url指向https://graph.microsoft.com就可以了。


以下是实例代码:
https://github.com/Azure-Samples/active-directory-dotnet-graphapi-console


调用时,可以结合graph api explorer一起使用
https://developer.microsoft.com/en-us/graph/graph-explorer