Forum Discussion
Frank Chen
Jan 18, 2017Brass Contributor
Use Outlook REST API to send email failed when using App-only token.
I am trying to use outlook REST API to send email by using app-only token and got the following exception. "x-ms-diagnostics: 2000008;reason="The token contains no permissions, or permissions can no...
- Jan 24, 2017
Mail.Send in App-only requires Admin Consent. (https://graph.microsoft.io/en-us/docs/authorization/permission_scopes)
You can request admin consent by pasking &prompt=admin_consent to the authorize endpoint.
Frank Chen
Jan 24, 2017Brass Contributor
Thanks for your note, Paul. I realized that the admin consent is required for the Azure Ad App created by non-admin like regular develoers. I also found out that there is a button call "Grant Permission" right beside "add" button at "Application Permission" slab in new Azure AD preivew portal. When admin click that button, it actually consent the permission. I wasn't able to find the detail document to explain what that button means from Azure AD portal. this button actually solved my issues.
Jan 24, 2017
Ah,yes. For a single tenant application, the portal approach is fine. My approach works for multi-tenant.
P.S. Those things in the portal are called a "blade" :)