从Azure App Service获取访问令牌以访问Microsoft Graph [英] Get Access Token from Azure App Service to access Microsoft Graph

查看:68
本文介绍了从Azure App Service获取访问令牌以访问Microsoft Graph的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.NET核心应用程序托管在  Azure
App Service
。该应用程序使用  Azure
应用服务认证


我配置了我的  additionalLoginParams   / config / authsettings   [" resource = https://graph.windows.net"]
反过来应该给我一个MS Graph的访问令牌via  /。auth / me  在
客户端或  Request.Headers [" x-ms-token-aad-access-token"]   on
C#。

I configured my additionalLoginParams /config/authsettings to ["resource=https://graph.windows.net"], which in turn should give me an access token to MS Graph either via /.auth/me on client side or Request.Headers["x-ms-token-aad-access-token"] on C#.


但我检查了服务器端和客户端,并且没有找到访问令牌。知道出了什么问题吗? 

However I checked both server side and client side, and there were no access token found. Any idea what went wrong? 

推荐答案

您好rkam1,

Hi rkam1,

您是否正在关注特定的教程/文档?如果您正在尝试从您无法执行Azure AD v2.0端点,因为目前Azure App V2和Azure功能不支持Azure AD V2(请参阅MSAL)。请这个

文档
以获取更多信息。 

Are you following a specific tutorial/documentation? If you're trying to get a token from the Azure AD v2.0 endpoint you can't do so because currently, Azure AD V2 (including MSAL) is not supported for Azure App Services and Azure Functions. Please this documentation for more information. 

这篇关于从Azure App Service获取访问令牌以访问Microsoft Graph的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆