简体   繁体   English

从Azure Functions调用Microsoft Graph API

[英]Calling Microsoft Graph API from Azure Functions

I am not sure if I am on the right path, but I am attempting to retrieve my contacts within an Azure Function. 我不确定自己走的路是否正确,但是我正在尝试在Azure函数中检索我的联系人。 I don't need to present a login as this is only for my account. 我不需要显示登录名,因为这仅适用于我的帐户。 I just want to be able to retrieve my Contacts from the Graph without having to explicitly authenticate. 我只希望能够从图表中检索我的联系人,而不必进行显式身份验证。 Is this possible? 这可能吗? My attempts have failed and I ultimately get stuck trying to add permission... 我的尝试失败了,我最终在尝试添加权限时陷入困境...

添加权限

When I click to add Permission, I get this error: 当我单击以添加权限时,出现此错误:

错误

I am trying to use AAD to authenticate. 我正在尝试使用AAD进行身份验证。 I tried creating the function within the Portal and also from VS. 我尝试在Portal以及VS中创建函数。 Any suggestions? 有什么建议么? Thanks!! 谢谢!!

You could follow the steps below to fix the issue. 您可以按照以下步骤解决此问题。

1.Navigate to the Authentication / Authorization of your function app, click the red frame part like the screenshot. 1.导航到功能应用程序的“ Authentication / Authorization ”,单击红色框部分,如屏幕截图所示。

在此处输入图片说明

  1. Go to Manage Permissions -> Add -> select the Windows Azure Active Directory API and Sign in and read user profile permission 转到Manage Permissions -> Add ->选择Windows Azure Active Directory API并Sign in and read user profile权限

    在此处输入图片说明

Then refresh the portal, it will work fine. 然后刷新门户,它将正常工作。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM