Skip to content

Navigation Menu

Sign up

How To for OnBehalfOf services access sample

Yury Opolev edited this page Oct 22, 2020 · 8 revisions

In order to be able to access various service within a tenant on behalf of any user, existing in given tenant, it would be needed to setup Azure AD Application with delegated permissions to services, and grant admin consent to that. Here are steps how to do that:

Setup single tenant application:

  1. Sign into Azure portal under admin user, and add Application registration:

[APP REGISTRATION STEP 1]

  1. Under supported Account types, specify "Accounts in this organizational directory only", and register the application:

[APP REGISTRATION STEP 2]

  1. Add Redirect URI to the application, go to "Authentication" -> "Platform Configurations" -> "Add a platform", choose "Web" and specify "Redirect Uri". [TODO value for redirecturi] :

[APP REGISTRATION STEP 3]

  1. Add client secret:

[APP REGISTRATION STEP 4.1] [APP REGISTRATION STEP 4.2]

  1. Add Application ID URI, go to "Overview" -> "Add an Application ID URI" -> "Set". Normally Application ID URI will be api://{Application ID}:

[APP REGISTRATION STEP 5.1] [APP REGISTRATION STEP 5.2] [APP REGISTRATION STEP 5.3]

  1. Now it is needed to add delegated permissions for this application, so it can access all needed services, such as Business Central, SharePoint, Power BI, Graph or the like. Go to "API Permissions" -> "Add a permission", and add needed permissions:

[APP REGISTRATION STEP 6.1] [APP REGISTRATION STEP 6.2] [APP REGISTRATION STEP 6.3] [APP REGISTRATION STEP 6.4] [APP REGISTRATION STEP 6.5]

  1. After permissions are added, grant admin consent to it:

[APP REGISTRATION STEP 7.1] [APP REGISTRATION STEP 7.2]

Now, Application is fully setup: it has Application ID URI, Secret, and Redirect URI, and has delegated access to all needed services within given tenant, which means that it is now possible to acquire on-behalf tokens.

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /