Personal One Drive Microsoft Graph binding in Azur

2019-07-22 00:38发布

How do you use the One Drive Microsoft Graph Binding with personal one drive ?

When running an Azure Function created in Azure Portal with One Drive Input Binding, an exception occurs and I receive the following error :

Code: BadRequest
Message: Tenant does not have a SPO license.

As I don't have Office 365 on this azure tenant, I understand that I could have this kind of error if I was requested a file from One Drive Business but I am using a Microsoft account (UserFromId).

1条回答
Ridiculous、
2楼-- · 2019-07-22 00:46

You need to configure Microsoft account authentication for the azure function from AAD https://docs.microsoft.com/en-us/azure/app-service/configure-authentication-provider-microsoft When you configure Input Binding click manage enter image description here

then choose mIcrosoft account

enter image description here

Goto this link https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/applicationsListBlade

choose manage personal account enter image description here

register a new application and then add the client secret to the application enter image description here

and give it update permission or read write to Onedrive enter image description here To get the user ID: enter your azure function URL as below to authenticate https://yourfunction.azurewebsites.net/.auth/login/aad

then access https://yourfunction.azurewebsites.net/.auth/me grab user_id

enter your outlook.com user ID as below: enter image description here

查看更多
登录 后发表回答