Using Azure Service Principal Authentication
The authentication as an Azure Service Principal is handled via the OAuth Client Credentials flow, and it does not involve direct user authentication. Instead, credentials are created for just the app itself. All tasks taken by the app are done without a default user context, but based on the assigned roles. The application access to the resources is controlled through the assigned roles' permissions.
Create an AzureAD App and an Azure Service Principal
When authenticating using an Azure Service Principal, you must register an application with an Azure AD tenant.Assign a role to the application
To access resources in your subscription, you must assign a role to the application.- Open the Subscriptions page by searching and selecting the Subscriptions service from the search bar.
- Select the particular subscription to assign the application to.
- Open the Access control (IAM) and select Add > Add role assignment to open the Add role assignment page.
- Select Owner as the role to assign to your created Azure AD app.
Complete the Authentication
You are ready to connect after setting one of the below connection properties groups, depending on the configured app authentication (client secret or certificate).In both methods
Before choosing client secret or certicate authentication, follow these steps then continue to the relevant section below:
- AuthScheme: Set this to the AzureServicePrincipal in your app settings.
- InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
- AzureTenant: Set this to the tenant you wish to connect to.
- OAuthClientId: Set this to the client Id in your app settings.
Continue with the following:
- OAuthClientId: Set this to the client Id in your app settings.
- OAuthClientSecret: Set this to the client secret in your app settings.
Authenticating using a Certificate
Continue with the following:
- OAuthJWTCert: Set this to the JWT Certificate store.
- OAuthJWTCertType: Set this to the type of the certificate store specified by OAuthJWTCert.