Skip to content

Authorization code

This walkthrough details the process of registering a Microsoft Entra ID application, granting it high-level API permissions, and securely connecting it to the Mindflow platform based on the provided documentation.

  1. To establish an identity for the integration, you must first register the application within your Microsoft Entra tenant.

  2. Navigate to App Registrations: In the Microsoft Azure portal, go to Microsoft Entra ID directory and select App registrations from the sidebar.

  3. Create New Registration: Click on + New registration.

    Auth pages jpg

  4. Configure Application Settings:

    1. Name: Enter a display name, such as “TEST”.
    2. Supported Account Types: Select Accounts in this organizational directory only (Single tenant).

    Auth pages jpg

  5. Complete Registration: Click Register. Once created, note the Application (client) ID and Directory (tenant) ID from the Essentials section for later use.

  1. Explicitly grant permissions to allow the app to interact with Microsoft Graph data.

    Auth pages jpg

  2. Access Permissions Menu: From the application sidebar, select API permissions.

    Auth pages jpg

    Auth pages jpg

  3. Choose Permission Type: Select Delegated permissions. This is used for services requiring the sign in of a user.

    Auth pages jpg

  4. Select Specific Scopes:

    1. Search for and select required permissions such as Files.Read.All, Files.ReadWrite, and Files.ReadWrite.All.

    Auth pages jpg

    Auth pages jpg

    1. Add offline_access to maintain access to data.

    Auth pages jpg

  5. Grant Admin Consent: Initially, the status will show as not granted.

  6. Click Grant admin consent and confirm to authorize these permissions for the entire tenant. A success message will appear once completed.

    Auth pages jpg

  1. Generate a client secret to allow Mindflow to authenticate as this application.

  2. Create Secret: Navigate to Certificates & secrets and click + New client secret.

    Auth pages jpg

  3. Set Expiration: Provide a description (e.g., “TEST”) and choose an expiration period, such as the recommended 180 days.

  4. Secure the Value: Immediately copy the Secret Value.

    Auth pages jpg

  1. To allow the app to properly redirect to Mindflow to allows users to approve the delegation of permissions to the App navigate to Overview then click Redirect URLs

    Auth pages jpg

  2. Click Add, select Web as platform and within the placeholder, write down https://credentials-{your-mindflow-env}.mindflow.io/oauth2/callback

    Auth pages jpg

  3. Click configure

    Auth pages jpg

  1. Use the gathered Azure details to create a functional credential within Mindflow.

  2. Start Credential Creation: In Mindflow, select the appropriate service, such as Microsoft Graph - Files.

    Auth pages jpg

  3. Configure Connection: Fill in the following details in Mindflow:

    1. Credential Name: e.g., “Microsoft Graph - Files credential”.
    2. Credential Type: Select OAuth 2.0 Authorization Code.

    Auth pages jpg

    1. Client ID: Paste the Application (client) ID from Phase 1.
    2. Client Secret: Paste the Secret Value generated in Phase 3.
    3. Callback URL: Ensure this matches the Redirect URI configured in Azure (e.g., https://credentials-{tenant}.mindflow.io/oauth2/callback).
    4. Endpoints: Use the provided OAuth 2.0 authorization and token endpoints, replacing {tenant-id} with your actual Directory ID.

    Auth pages jpg

    1. Set Scopes: Under Advanced settings, enter the required scopes, such as offline_access https://graph.microsoft.com/.default.

    Auth pages jpg

  4. Authorize: Click Authorize and create. You will be prompted to sign in and accept the requested permissions for your organization.

    Auth pages jpg

  5. A successful integration will result in an “Authorization Successful!” message.

    Auth pages jpg