Application configuration in Azure Portal for the Power BI OAuth2 account

The Snaps in the Microsoft Power BI Snap Pack require a Power BI OAuth2 account to access Azure resources. To authorize the OAuth2 account successfully, create and configure an application corresponding to the account, as shown in the following workflow.


Application configuration workflow
Note: You must complete steps 1 through 3 in the Azure Portal and the remaining step in the Snap account (SnapLogic Platform).
An Azure account with a free subscription to create the application.
  1. Create an application in the Azure Portal.
    1. Log in to the Microsoft Azure Portal.
    2. Navigate to Azure services > Azure Active Directory.
    3. Navigate to Add > App registration.
    4. On the Register an application page, specify the name for registering the application and click Register.

      Learn more about creating an application at Quickstart: Register an app in the Microsoft identity platform.

      Note: To use an existing application, navigate to Portal Home > Azure Active Directory > App registrations > All applications and specify the name of the application that you want to use in the search box. The details of the application appear in the search results.
  2. Define the permissions for the application.
    1. On the left navigation panel, navigate to Manage > API permissions > Add a permission.

      Add a permission
    2. On the Request API permissions window, select Microsoft Graph > Application permissions for the OAuth2 application account.

      Request API permissions
    3. Select the permissions from Files, Users, and Teams.

      Choose the minimum API permissions that the Scopes and permissions required table lists.

    4. Click Add permissions.

      Configured permissions
      All the permissions that you added appear under Configured permissions.
    5. Click Grant admin consent and select Yes in the confirmation dialog.

      Grant admin consent
    6. Click Overview and select Add a Redirect URI.

      Add a Redirect URI
      The Platform configurations page appears.
    7. Under Platform configurations, click Add a platform.
    8. Select Web, specify a valid redirect URI, and click Configure.

      Example: https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/PowerBI


      Configure a Web redirect URI
      A message confirms that the application is updated successfully.
    9. On the Platform configurations page, click Save.

      Save the platform configurations

    Scopes and permissions required

    Permission Display String Description Admin Consent Required?
    Application.Read.All Application.Read.All Allows the app to read applications and service principals on behalf of the signed-in user. Yes
    AppCatalog.Read.All AppCatalog.Read.All Allows the app to read the apps in the app catalogs. No
  3. Locate the application credentials in the Azure Portal.

    To authorize your account in SnapLogic, you must have the following application credentials:

    • Application (client) ID
    • Directory (tenant) ID
    • Client secret value
    1. On the application page, under Essentials, note the Application (client) ID and Directory (tenant) ID that the Snap account requires.

      Application essentials showing the client and tenant IDs
    2. In the left navigation panel, select Manage > Certificates & secrets.
    3. On the Certificates & secrets page, click + New client secret.
    4. In the Add a client secret window, enter the Description, select an option for Expires from the dropdown list, and click Add.

      Add a client secret
      Note: You can copy the client secret value only after it is generated. This value is displayed only once, so ensure that you copy it securely.
      The client secret value and ID are generated. This value and the ID are required to configure the OAuth2 account.
  4. Specify the credentials and validate the Snap account.
    1. Navigate to the Snap of your choice and configure the OAuth2 account with the details from the registered application in the Azure Portal.

      For the field descriptions, see Power BI OAuth2 Account.

    2. Select the Auto-refresh token checkbox in the account settings and click Apply.
      Note: If you select the Auto-refresh token checkbox, you must provide offline_access as the scope in the token endpoint configuration.
    3. Click Authorize.
      The access and refresh tokens are generated, and the sign-in page of the Azure Portal appears.
    4. Sign in to the Azure Portal with valid credentials.
      The Edit account settings dialog appears. The access and refresh tokens are auto-populated but encrypted in the account settings.
    5. Validate the Snap account.

Error 401

The token is invalid.

Provide a valid token and reauthorize the account.

The redirect URI specified does not match the reply URI configured for the application.

You specified an incorrect redirect URI.

Add the following redirect_uri: https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/PowerBI

URL error when invoking the operation

The tenant domain name is incorrect.

Ensure that the Directory (tenant) ID that you noted from the application is in the correct format. For example, 2060aafa-89d9-423d-9514-eac46338ec05.

Frequently Asked Questions

Can we use an existing registered application to add an account to the Snap?

Yes. You can register a new application or use an existing application in the Azure Portal to create an OAuth2 account. See step 1, Create an application in the Azure Portal. For more information, see Register a client application in Microsoft Entra ID.

Where can I find examples of the Application ID, Tenant ID, and Secret key values?

Step 3, Locate the application credentials in the Azure Portal, shows where to find the application ID, client ID, and secret key values. For more information, see Power BI OAuth2 Account.

Where do I find more support for account-related information and other issues?

Contact the SnapLogic support team. The help icon in the Snap provides reference information for the selected Snap.

What type of permission does the registered application need?

The Scopes and permissions required table lists the delegated and application permissions that Azure Active Directory requires. For any other permissions that your application needs, see Microsoft Graph permissions reference.

How many accounts does the Microsoft Power BI Snap Pack have?

The Microsoft Power BI Snap Pack has one account type. Use the Power BI OAuth2 account to connect Power BI Snaps with data sources. For more information, see Power BI OAuth2 Account.