---
title: "Example: OAuth Configuration for Microsoft Power Automate"
slug: "example-oauth-configuration-for-powerautomate"
updated: 2026-08-18T20:17:30Z
published: 2026-08-18T20:17:30Z
canonical: "docs.algosolutions.com/example-oauth-configuration-for-powerautomate"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.algosolutions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Example: OAuth Configuration for Microsoft Power Automate

This guide explains how to:

- Integrate an Algo device with Microsoft Power Automate using OAuth
- Verify the configuration by invoking a Power Automate flow
- Invoke a Power Automate flow from an Algo 8450 button using OAuth

This configuration allows an Algo device to securely trigger a Microsoft Power Automate flow using OAuth authentication. After the OAuth profile is authorized, the device can reuse the authorization to trigger the flow without requiring the user to sign in each time. In this example configuration, after you configure an Algo 8450 button to trigger a Power Automate flow using an authorized OAuth profile, you can press the button to start a Teams meeting without signing in to Microsoft or reauthorizing the device each time.

> [!NOTE]
> Note
> 
> This document includes third-party configuration procedures that are subject to change. It is provided for reference purposes only, and Algo cannot guarantee that the screenshots or procedures will always be current or up to date.

### **Before You Start**

Ensure you have:

- Access to Microsoft Power Automate
- A Power Automate flow configured

In this example, it’s a workflow with a **When a Teams webhook request is received** trigger

### Procedure Overview

This procedure includes the following steps:

1. [Creating a Microsoft Entra Application](/docs/example-oauth-configuration-for-powerautomate#creating-a-microsoft-entra-application)
2. [Creating an OAuth Authorization Profile](/docs/example-oauth-configuration-for-powerautomate#creating-oauth-authorization-profile)
3. [Obtaining the HTTP URL from Your Power Automate Workflow](/docs/example-oauth-configuration-for-powerautomate#obtaining-the-webhook-url-from-your-power-automate-workflow1)
4. [Triggering a Power Automate Flow](/docs/example-oauth-configuration-for-powerautomate#sending-a-test-email)
5. (Optional) [Configuring an 8450 Button to Trigger a Power Automate Workflow](/docs/example-oauth-configuration-for-powerautomate#configuring-an-8450-button-to-trigger-a-workflow)

---

### Creating a Microsoft Entra Application

Create a Microsoft Entra application and obtain the required credentials for OAuth.

1. Sign in to the [**Microsoft Entra admin center**](https://entra.microsoft.com/auth/login/).
2. Go to **App registrations** and select **+ New registration**.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/image(832) (1).png)
3. Configure the application details:

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/image-SBDSNDMR.png)
  - **Name**: Enter a name for your application. For example, *Algo Device Notifier.*
  - **Supported account types**: Choose the option that fits your deployment.
  - Enter the redirect URI: Select **Public client/native (mobile & desktop)** and enter your Algo device’s callback URL using this format: [https://<ALGO_DEVICE_IP>/control/oauth-callback.lua.](https://&lt;8450-device-ip&gt;/control/oauth-callback.lua.)

> [!NOTE]
> Note
> 
> - The redirect URI must use HTTPS.
> - The redirect URI must match exactly in both Microsoft Entra and the device’s configuration.

1. Select **Register**.
2. After registration, copy these values from the application’s **Overview** page:
  - **Application (client) ID**
  - **Directory (tenant) ID**

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/Screenshot 2026-06-03 100410 (1).png)

You need this information to configure OAuth later.
3. Select **Certificates & secrets** → **+ New client secret.**

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/Screenshot 2026-06-03 100607 (1).png)
4. Enter the client secret details, then select **Add**.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/image(810).png)
  - **Description**: Enter a description.
  - **Expires**: Select an expiration option.
5. Copy the secret **Value** and save it securely. You will need it when creating the OAuth authorization profile later.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/Screenshot 2026-04-06 112826 (1) (1) (1) (1) (1).png)
6. Go to **API permissions** → **Add a permission**.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/Screenshot 2026-06-03 100223 (1).png)
7. Select **Microsoft APIs** → **Power Automate**.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/Screenshot 2026-06-03 100930 (1).png)
8. Select **Delegated permissions**.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/Screenshot 2026-06-03 101147 (1).png)
9. Search for and add the **User** permission.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/image-HVE3E4SC.png)
10. Go to **API permissions** → **Add a permission**.
11. Select **Microsoft Graph**.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/Screenshot 2026-04-06 113637 (1).png)
12. Select **Delegated permissions**.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/Screenshot 2026-04-06 113813 (1).png)
13. Add the following permissions:

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/image-EP4VA3W2.png)
  - **offline_access**: Maintain access to data you have given it access to
  - **openid**: Sign users in
  - **profile**: View users’ basic profile
14. Select **Add Permissions**.

Your application should now have the following permissions:

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/image-81YB1ZIS.png)

### Creating an OAuth Authorization Profile

Create an OAuth profile to store your Power Automate authentication settings.

Ensure you have the following:

- **Directory (tenant) ID**
- **Application (client) ID**
- **Client Secret**

**To create a Power Automate OAuth Profile:**

1. Log in to your device’s web interface using HTTPS.

HTTPS is required by the OAuth process.
2. Go to the **Advanced Settings** → **OAuth**.
3. Set a **Name** for your OAuth profile.
4. Select **POWER_AUTOMATE** as the **Provider Type.**
5. Accept the following automatically populated values:
  - **Grant Type**: AUTH_CODE_PKCE
  - **Client Auth Mode**: NONE
  - **Scope Mode**: SCOPES_LIST
  - **Scope**: openid profile offline_access [https://service.flow.microsoft.com//.default](https://service.flow.microsoft.com//.default)
  - **PKCE Method**: S256
  - **Response Type**: code
6. Configure the following:
  - **Token URL**: Replace the [{tenant}](https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token) with your **Directory (tenant) ID** in this URL: [https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token](https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token)
  - **Auth URL**: Replace the [{tenant}](https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token) with your **Directory (tenant) ID** in this URL: [https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize](https://login.microsoftonline.com/{tenant}/oauth2/v2.0/authorize)
  - **Client ID**: Enter your **Application (client) ID**.
  - **Client Secret**: Enter your **Client Secret**
  - **PKCE Redirect URI**: Set to `https://&lt;ALGO_DEVICE_IP&gt;/control/oauth-callback.lua`

Replace <ALGO_DEVICE_IP> with your device IP.

> [!NOTE]
> Note
> 
> You must use HTTPS in the URI.
7. Leave the following fields blank. These values are automatically populated during authorization.
  - **PKCE Authorization Code**
  - **PKCE Code Verifier**
  - **PKCE Refresh Token**

> [!NOTE]
> Note
> 
> Refresh tokens can expire or become invalid for several reasons, such as revoked app access, password changes, unused tokens, or admin policy restrictions. Refer to the OAuth provider’s documentation for more information. If a refresh token expires or becomes invalid, your automation stops working until OAuth access is reauthorized.
8. Set **Extra Params (JSON)** as below:

Replace the <YOUR_TENANT_ID> with your **Directory (tenant) ID**.

```bash
{
  "tenant": "<YOUR_TENANT_ID>",
  "prompt": "select_account",
  "resource_hint": "graph",
  "jwks_uri": "https://login.microsoftonline.com/{tenant}/discovery/v2.0/keys"
}
```
9. Select **START AUTHORIZATION**.
10. Select your Microsoft account.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/Screenshot 2026-04-06 133246 (1).png)
11. Upon successful authorization, the **PKCE Authorization Code** and **PKCE Code Verifier** are automatically filled.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/Screenshot 2026-06-18 110348 (1).png)
12. Select **Create Profile**.

Your profile appears under the **OAuth Profiles** list.

## **Obtaining the HTTP URL from Your Power Automate Workflow**

You will need to obtain the API Target and Custom Path from your workflow’s webhook URL for configuring the Algo 8450 button in the next step.

If you need help creating a Power Automate workflow, refer to this [example](https://docs.algosolutions.com/shared/a4c65e19-bc53-4b0a-99a9-bf93478ea70b).

**To obtain the webhook URL from your Power Automate workflow:**

1. Log in to [Power Automate](https://make.powerautomate.com/).
2. Select **My flows** and then select the workflow you created.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/Screenshot%202025-10-16%20151411%20(2).png)
3. Select **Edit**.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/Screenshot%202025-10-16%20151619%20(1)%20(1)%20(1).png)
4. Click the first action in your workflow **When a Teams webhook request is received**.
5. For the question **Who can trigger the flow?**, set it as **Any user in my tenant**. Then, select **Save**.
6. Click **Copy** ![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/file_copy_24dp_373737_FILL0_wght400_GRAD0_opsz24(1).png) to obtain the HTTP URL (webhook).

> [!NOTE]
> **Note**
> 
> This URL is used by your Algo 8450 to trigger your Power Automate workflow.
> 
> Keep it confidential because anyone with this link could trigger your workflow and send data to it.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/Screenshot 2026-06-18 125847 (1).png)
7. Paste this URL into a notebook.

Let’s use the following fake URL as an example.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/image(540).png)
8. Retrieve the following information from your HTTP URL.
  - **API Target:** The string between `https://` and `/powerautomate/...` section.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/image(537).png)
  - **Custom Path**: The string begins with `powerautomate` to the end of the URL.

> [!NOTE]
> **Note**
> 
> Make sure there are no trailing spaces when you copy this string.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/image(539).png)
9. Save the information. You will need it in the 8450 button configuration later.

### Triggering a Power Automate Flow

You can trigger a Power Automate flow to verify that the configuration is working correctly.

Before you start, you need the following information:

- Your Microsoft Entra application’s **Directory (tenant) ID**
- Your Power Automate **Workflow HTTP URL**

**To trigger a test Power Automate flow:**

1. Log in to your device’s web interface using HTTPS.

HTTPS is required by the OAuth process.
2. Go to the **Advanced Settings** → **OAuth**.
3. Select your **Power Automate** profile from the **Test OAuth Profile** dropdown list.
4. Select **POWER_AUTOMATE** as the **Provider Type Template.**
5. For the **Target URL and Path**, enter your Power Automate workflow **HTTP URL.**
6. Enter the **Data Payload**, if applicable for your workflow.
7. Select **RUN OAuth Test**.

Upon success:
  - The Power Automate workflow is triggered.

  

A successful response is displayed.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/image-BPDUXPSY.png)

**Related Links:**

- [Obtaining the Webhook URL from Your Power Automate Workflow](/docs/example-oauth-configuration-for-powerautomate#obtaining-the-webhook-url-from-your-power-automate-workflow1)

### Configuring an 8450 Button to Trigger a Power Automate Workflow

You can configure a button on the Algo 8450 to trigger a Power Automate flow.

Before you start, you need the following information:

- Your Microsoft Entra application’s **Directory (tenant) ID**
- Your Power Automate workflow **API Target** and **Custom Path** obtained from the previous step

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/image (4) (1) (1).png)

**To configure a 8450 button to trigger a Power Automate workflow:**

1. Create a button on an 8450 screen.
2. Set the **Button Status** to **Enabled.**
3. Configure the following:
  - **Text**: Enter the button display text.
  - **Action**: Set to **Send API Request**.
  - **Number of API Requests**: Set to **1**.
  - **Request 1 - Command**: Set to **Other**.
  - **Request 1 - Method**: Set to **POST**.
  - **Request 1 - Custom Path**: Enter the **Custom Path** you obtained from the Power Automate HTTP URL.
  - **Request 1 - Targets**: Enter the **API Target** you obtained from the Power Automate HTTP URL.
  - **Request 1 - OAuth Profile**: Select your Power Automate profile.
  - **Request 1 - Headers**: Set to **Custom Headers**.
  - **Request 1 - Custom Headers**: Set to `Content-Type: application/json`
4. Select **Save.**

Press the button and verify that the workflow is triggered.

**Related Links:**

- [Obtaining the Webhook URL from Your Power Automate Workflow](/docs/example-oauth-configuration-for-powerautomate#obtaining-the-webhook-url-from-your-power-automate-workflow1)

## Troubleshooting

**I get a 502 error when I run the OAuth Test**

You may be logged out of your Algo device’s web interface. Log in again and retry.

**After I run the “Start Authorization” again, my OAuth Test fails**

Each time you run **Start Authorization** again, select **Update Profile** to save the new credentials before running the test.

![](https://cdn.document360.io/f6f5e62d-d280-487f-9da7-5926ffd53b5f/Images/Documentation/Screenshot 2026-04-06 151132 (1).png)

**My OAuth profile stops working**

An OAuth profile can stop working if the OAuth provider rejects or invalidates the access or refresh token. Refer to the OAuth provider’s documentation for more information. If this occurs, the OAuth profile must be reauthorized.
