How can I implement admin consent flow for native app using O365 APIs of which permission scopes require admin consent?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Admin Consent happens "out of band" from your normal authentication flow. To do this, you'll first need and Admin authenticate by going to:
https://login.microsoftonline.com/common/adminconsent?<yours params>
.
You can provide this link within your app. Typically you would first attempt to authenticate them and present them with the Admin Consent option that process fails.
Once an Admin grants consent, users will be able to use OAUTH to authenticate via the standard endpoint:
https://login.microsoftonline.com/common/oauth2/authorize?<your params>