{"id":40525,"date":"2025-03-06T15:37:28","date_gmt":"2025-03-06T10:07:28","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=40525"},"modified":"2025-03-27T12:22:02","modified_gmt":"2025-03-27T06:52:02","slug":"how-to-secure-http-requests-using-oauth-authentication-in-power-automate","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2025\/03\/how-to-secure-http-requests-using-oauth-authentication-in-power-automate\/","title":{"rendered":"How to Secure HTTP Requests Using OAuth Authentication in Power Automate"},"content":{"rendered":"<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40554\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/Power-Automate.jpg\" alt=\"Power Automate\" width=\"800\" height=\"457\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/Power-Automate.jpg 800w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/Power-Automate-300x171.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/Power-Automate-768x439.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/Power-Automate-660x377.jpg 660w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>When working with workflows triggered by HTTP requests, you may face a common challenge, i.e., ensuring that only authorized users can start the workflow. In many cases, you might need to restrict access so that only specific users within your organization can trigger it.<\/p>\n<p>When a workflow is triggered by an HTTP request, controlling who can access it is crucial. Without proper security in place, anyone with the request URL could start the workflow, leading to unauthorized users gaining access to critical business processes or sensitive data. This could pose serious security risks to your organization, potentially leading to data breaches, process disruptions, or compliance issues.<\/p>\n<p>To resolve this, you need a reliable way to manage authentication. One effective approach is OAuth authentication, which allows you to limit access to specific users within your organization. By implementing OAuth, you can ensure that only approved users have permission to trigger the workflow, while unauthorized users are blocked. This not only strengthens security but also ensures that workflows are used only by the right people, improving efficiency and protecting vital business information.<\/p>\n<p>By setting up OAuth authentication for the &#8220;When an HTTP request is received&#8221; trigger, your company can:<\/p>\n<ul>\n<li><strong>Restrict Access<\/strong> \u2013 Ensure only authenticated users from the organization can trigger the workflow.<\/li>\n<li><strong>Allow Specific Users<\/strong> \u2013 Limit execution to only certain employees or service principals.<\/li>\n<li><strong>Verify Authentication Claims<\/strong> \u2013 Ensure each request contains valid credentials with necessary claims (e.g., tenant ID, issuer, audience).<\/li>\n<\/ul>\n<p>This security enhancement protects sensitive data and ensures workflows are triggered only by the right people, reducing the risk of unauthorized actions.<\/p>\n<p><strong>Prerequisites: <\/strong>Before setting up OAuth authentication for HTTP request triggers in <a href=\"https:\/\/www.inogic.com\/services\/microsoft-power-platform\/microsoft-power-automate\/?utm_source=inogic-t-blog&amp;utm_medium=power-automate&amp;utm_campaign=itblog&amp;utm_id=power-automate\" target=\"_blank\" rel=\"noopener\">Power Automate<\/a>, ensure you have:<\/p>\n<ul>\n<li><strong>Power Automate Account<\/strong> \u2013 Access to create and manage workflows.<\/li>\n<li><strong>Azure AD Tenant<\/strong> \u2013 Required for authentication and app registrations.<\/li>\n<li><strong>App Registration in Azure AD<\/strong> \u2013 Must have API permissions for Power Automate.<\/li>\n<li><strong>Admin Access to Azure Portal<\/strong> \u2013 To configure authentication and manage credentials.<\/li>\n<li><strong>HTTP Request Trigger<\/strong> \u2013 A flow using <strong>&#8220;<\/strong>When an HTTP request is received<strong>&#8220;<\/strong> trigger.<\/li>\n<li><strong>Valid API Permissions<\/strong> \u2013 Ensures secure authentication and service access.<\/li>\n<li><strong>OAuth 2.0 Token Endpoint<\/strong> \u2013 Knowledge of obtaining access tokens from Azure AD.<\/li>\n<li><strong>Postman or API Testing Tool (Optional)<\/strong> \u2013 Helps test API requests and authentication.<\/li>\n<\/ul>\n<p><strong>How to Configure: \u00a0<\/strong>First go to <a href=\"https:\/\/portal.azure.com\/#home\" target=\"_blank\" rel=\"noopener\">Home &#8211; Microsoft Azure<\/a> and select Microsoft Entra ID.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40527\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/1OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1908\" height=\"893\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/1OAuth-Authentication-in-Power-Automate.png 1908w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/1OAuth-Authentication-in-Power-Automate-300x140.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/1OAuth-Authentication-in-Power-Automate-1024x479.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/1OAuth-Authentication-in-Power-Automate-768x359.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/1OAuth-Authentication-in-Power-Automate-1536x719.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/1OAuth-Authentication-in-Power-Automate-660x309.png 660w\" sizes=\"(max-width: 1908px) 100vw, 1908px\" \/><\/p>\n<p>Now go to App registration <strong>&gt; <\/strong>New registration.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40529\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/2OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1879\" height=\"889\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/2OAuth-Authentication-in-Power-Automate.png 1879w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/2OAuth-Authentication-in-Power-Automate-300x142.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/2OAuth-Authentication-in-Power-Automate-1024x484.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/2OAuth-Authentication-in-Power-Automate-768x363.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/2OAuth-Authentication-in-Power-Automate-1536x727.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/2OAuth-Authentication-in-Power-Automate-660x312.png 660w\" sizes=\"(max-width: 1879px) 100vw, 1879px\" \/><\/p>\n<p>And give a name to the Application and add a redirect URL if you want and click on Register.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40531\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/3OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1837\" height=\"891\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/3OAuth-Authentication-in-Power-Automate.png 1837w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/3OAuth-Authentication-in-Power-Automate-300x146.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/3OAuth-Authentication-in-Power-Automate-1024x497.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/3OAuth-Authentication-in-Power-Automate-768x373.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/3OAuth-Authentication-in-Power-Automate-1536x745.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/3OAuth-Authentication-in-Power-Automate-660x320.png 660w\" sizes=\"(max-width: 1837px) 100vw, 1837px\" \/><\/p>\n<p>Once you click on register you will be Redirected to Newly created apps Overview tab. As Shown below copy the Application (Client) ID and Directory (Tenant) ID store it somewhere.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40533\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/4OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1835\" height=\"809\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/4OAuth-Authentication-in-Power-Automate.png 1835w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/4OAuth-Authentication-in-Power-Automate-300x132.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/4OAuth-Authentication-in-Power-Automate-1024x451.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/4OAuth-Authentication-in-Power-Automate-768x339.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/4OAuth-Authentication-in-Power-Automate-1536x677.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/4OAuth-Authentication-in-Power-Automate-660x291.png 660w\" sizes=\"(max-width: 1835px) 100vw, 1835px\" \/><\/p>\n<p>Now go to API Permissions and select the Power Automate and give Delegated permission as below.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40535\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/5OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1252\" height=\"729\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/5OAuth-Authentication-in-Power-Automate.png 1252w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/5OAuth-Authentication-in-Power-Automate-300x175.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/5OAuth-Authentication-in-Power-Automate-1024x596.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/5OAuth-Authentication-in-Power-Automate-768x447.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/5OAuth-Authentication-in-Power-Automate-660x384.png 660w\" sizes=\"(max-width: 1252px) 100vw, 1252px\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40537\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/6OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1224\" height=\"396\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/6OAuth-Authentication-in-Power-Automate.png 1224w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/6OAuth-Authentication-in-Power-Automate-300x97.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/6OAuth-Authentication-in-Power-Automate-1024x331.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/6OAuth-Authentication-in-Power-Automate-768x248.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/6OAuth-Authentication-in-Power-Automate-660x214.png 660w\" sizes=\"(max-width: 1224px) 100vw, 1224px\" \/><\/p>\n<p>Also check the check box as below and hit Add permissions button.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40539\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/7OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1260\" height=\"834\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/7OAuth-Authentication-in-Power-Automate.png 1260w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/7OAuth-Authentication-in-Power-Automate-300x199.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/7OAuth-Authentication-in-Power-Automate-1024x678.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/7OAuth-Authentication-in-Power-Automate-768x508.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/7OAuth-Authentication-in-Power-Automate-660x437.png 660w\" sizes=\"(max-width: 1260px) 100vw, 1260px\" \/><\/p>\n<p>Give Admin consent as shown below, and status should look like below.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40540\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/8OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1473\" height=\"695\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/8OAuth-Authentication-in-Power-Automate.png 1473w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/8OAuth-Authentication-in-Power-Automate-300x142.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/8OAuth-Authentication-in-Power-Automate-1024x483.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/8OAuth-Authentication-in-Power-Automate-768x362.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/8OAuth-Authentication-in-Power-Automate-660x311.png 660w\" sizes=\"(max-width: 1473px) 100vw, 1473px\" \/><\/p>\n<p>Now go to Certificates and Secrets tab and create the new client secret as shown below. Write Description and expiration date for the secret and click on Add.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40541\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/9OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1896\" height=\"896\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/9OAuth-Authentication-in-Power-Automate.png 1896w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/9OAuth-Authentication-in-Power-Automate-300x142.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/9OAuth-Authentication-in-Power-Automate-1024x484.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/9OAuth-Authentication-in-Power-Automate-768x363.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/9OAuth-Authentication-in-Power-Automate-1536x726.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/9OAuth-Authentication-in-Power-Automate-660x312.png 660w\" sizes=\"(max-width: 1896px) 100vw, 1896px\" \/><\/p>\n<p>Once you click on add, copy the value and store it somewhere, as it gets encrypted after some time.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40542\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/10OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1472\" height=\"517\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/10OAuth-Authentication-in-Power-Automate.png 1472w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/10OAuth-Authentication-in-Power-Automate-300x105.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/10OAuth-Authentication-in-Power-Automate-1024x360.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/10OAuth-Authentication-in-Power-Automate-768x270.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/10OAuth-Authentication-in-Power-Automate-660x232.png 660w\" sizes=\"(max-width: 1472px) 100vw, 1472px\" \/><\/p>\n<p>Once you&#8217;ve completed the above steps, you will need the Application (Client) ID and Client Secret value. To obtain them, go to the App overview, click on Endpoint, and copy the API endpoint as shown below to generate user-specific tokens.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40543\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/11OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1882\" height=\"835\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/11OAuth-Authentication-in-Power-Automate.png 1882w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/11OAuth-Authentication-in-Power-Automate-300x133.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/11OAuth-Authentication-in-Power-Automate-1024x454.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/11OAuth-Authentication-in-Power-Automate-768x341.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/11OAuth-Authentication-in-Power-Automate-1536x681.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/11OAuth-Authentication-in-Power-Automate-660x293.png 660w\" sizes=\"(max-width: 1882px) 100vw, 1882px\" \/><\/p>\n<p>Now open any API testing tool here I am using Postman to perform the API request.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40544\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/12OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1730\" height=\"432\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/12OAuth-Authentication-in-Power-Automate.png 1730w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/12OAuth-Authentication-in-Power-Automate-300x75.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/12OAuth-Authentication-in-Power-Automate-1024x256.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/12OAuth-Authentication-in-Power-Automate-768x192.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/12OAuth-Authentication-in-Power-Automate-1536x384.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/12OAuth-Authentication-in-Power-Automate-660x165.png 660w\" sizes=\"(max-width: 1730px) 100vw, 1730px\" \/><\/p>\n<p>In the body, include the following data. Here, client_id and client_secret refer to the Application (Client) ID and the Certificates &amp; Secrets value, as mentioned earlier.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40545\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/13OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1701\" height=\"782\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/13OAuth-Authentication-in-Power-Automate.png 1701w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/13OAuth-Authentication-in-Power-Automate-300x138.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/13OAuth-Authentication-in-Power-Automate-1024x471.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/13OAuth-Authentication-in-Power-Automate-768x353.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/13OAuth-Authentication-in-Power-Automate-1536x706.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/13OAuth-Authentication-in-Power-Automate-660x303.png 660w\" sizes=\"(max-width: 1701px) 100vw, 1701px\" \/><\/p>\n<p><strong>Note<\/strong>: Using the request above, we will obtain a user-specific token based on the username and password provided. If you do not require a user-specific token, set grant_type to &#8220;client_credentials&#8221; and remove the username and password fields. In this case, the token will be generated for the app associated with the provided App ID and client secret. Additionally, ensure that the scope of the token is set to: <a href=\"https:\/\/service.flow.microsoft.com\/.default\" target=\"_blank\" rel=\"noopener\">https:\/\/service.flow.microsoft.com\/\/.default<\/a><br \/>\nOtherwise, you may encounter an &#8220;invalid scope&#8221; error. You can also decode and verify the token using tools like <a href=\"https:\/\/jwt.io\/\" target=\"_blank\" rel=\"noopener\">JSON Web Tokens &#8211; jwt.io<\/a>.<\/p>\n<p>Once, we are done with the above steps, we can proceed with Flow configuration and the logic that we want to execute through our Power Automate Flow for that, you can use Power Apps or Power Automate here I am using Power Apps to configure the Flow<\/p>\n<p>Select New flow &gt; Instant cloud flow, give name to the flow and select \u201cWhen an HTTP request is received\u201d trigger. Then hit the Create button.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40546\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/14OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1892\" height=\"829\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/14OAuth-Authentication-in-Power-Automate.png 1892w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/14OAuth-Authentication-in-Power-Automate-300x131.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/14OAuth-Authentication-in-Power-Automate-1024x449.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/14OAuth-Authentication-in-Power-Automate-768x337.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/14OAuth-Authentication-in-Power-Automate-1536x673.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/14OAuth-Authentication-in-Power-Automate-660x289.png 660w\" sizes=\"(max-width: 1892px) 100vw, 1892px\" \/><\/p>\n<p>Select the <strong>\u201cWho can trigger the flow?\u201d <\/strong>option you can select.<\/p>\n<ol>\n<li><strong>Anyone<\/strong> \u2013 Anyone with the HTTP URL can trigger the flow. No authentication or security tokens are required, meaning anyone who has the link can run the flow.<\/li>\n<li><strong>Any user in my organization<\/strong> \u2013 Only users within your Microsoft 365 tenant (organization) can trigger the flow. They must sign in using their Microsoft (Azure AD) account. External users outside your organization cannot access it.<\/li>\n<li><strong>Specific users in my organization<\/strong> \u2013 Only selected users within your organization can trigger the flow. The flow owner must manually specify who has access, and users must authenticate with their Microsoft (Azure AD) account.<\/li>\n<\/ol>\n<p>We will not select &#8220;Anyone&#8221; as it follows the legacy behaviour of this trigger, allowing anyone with access to the HTTP URL and JSON schema to use it. Instead, we will explore the other two options. In the first case, I have selected &#8220;Any user in my tenant&#8221;. Now, generate a JSON schema based on the data you want to pass through the HTTP URL. For testing, I am using the following dummy data:<\/p>\n<p>\u201c[{ &#8220;customerName&#8221;: &#8220;Robert Carlson&#8221;, &#8220;billingAddress&#8221;: &#8220;Florida&#8221;, &#8220;email&#8221;: &#8220;test@gmail.com&#8221;, &#8220;customerType&#8221;: &#8220;Premium&#8221;, &#8220;orderHistory&#8221;: [ { &#8220;orderId&#8221;: &#8220;ORD12345&#8221;, &#8220;orderDate&#8221;: &#8220;2024-02-18&#8221;, &#8220;totalAmount&#8221;: 5000}]}]\u201d.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40547\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/15OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"893\" height=\"710\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/15OAuth-Authentication-in-Power-Automate.png 893w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/15OAuth-Authentication-in-Power-Automate-300x239.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/15OAuth-Authentication-in-Power-Automate-768x611.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/15OAuth-Authentication-in-Power-Automate-660x525.png 660w\" sizes=\"(max-width: 893px) 100vw, 893px\" \/><\/p>\n<p>Once this is completed, add the next action and save the flow. This will generate the HTTP URL. Copy the URL and paste it into an API testing tool. Then, add the Authorization header with the access token obtained in the previous step, as shown below.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40548\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/16OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1705\" height=\"420\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/16OAuth-Authentication-in-Power-Automate.png 1705w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/16OAuth-Authentication-in-Power-Automate-300x74.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/16OAuth-Authentication-in-Power-Automate-1024x252.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/16OAuth-Authentication-in-Power-Automate-768x189.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/16OAuth-Authentication-in-Power-Automate-1536x378.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/16OAuth-Authentication-in-Power-Automate-660x163.png 660w\" sizes=\"(max-width: 1705px) 100vw, 1705px\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40549\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/17OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1920\" height=\"1002\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/17OAuth-Authentication-in-Power-Automate.png 1920w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/17OAuth-Authentication-in-Power-Automate-300x157.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/17OAuth-Authentication-in-Power-Automate-1024x534.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/17OAuth-Authentication-in-Power-Automate-768x401.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/17OAuth-Authentication-in-Power-Automate-1536x802.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/17OAuth-Authentication-in-Power-Automate-660x344.png 660w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>Once you have the authority to trigger the flow, you will receive a &#8220;202 Accepted&#8221; response, and the flow will be triggered immediately if the access token belongs to a user within the same tenant.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40550\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/18OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1492\" height=\"821\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/18OAuth-Authentication-in-Power-Automate.png 1492w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/18OAuth-Authentication-in-Power-Automate-300x165.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/18OAuth-Authentication-in-Power-Automate-1024x563.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/18OAuth-Authentication-in-Power-Automate-768x423.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/18OAuth-Authentication-in-Power-Automate-660x363.png 660w\" sizes=\"(max-width: 1492px) 100vw, 1492px\" \/><\/p>\n<p>Now, let&#8217;s test the &#8220;Specific user in my tenant&#8221; option by attempting to trigger the flow with a user who is not included in the Allowed user list.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40551\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/19OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"896\" height=\"754\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/19OAuth-Authentication-in-Power-Automate.png 896w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/19OAuth-Authentication-in-Power-Automate-300x252.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/19OAuth-Authentication-in-Power-Automate-768x646.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/19OAuth-Authentication-in-Power-Automate-660x555.png 660w\" sizes=\"(max-width: 896px) 100vw, 896px\" \/><\/p>\n<p><strong>Note:<\/strong> In the Allowed user list, you can specify both user email addresses and Azure app object IDs, separated by a semicolon (;). If an HTTP request is made using an access token from a user or application not listed in the Allowed user list, the flow will not be triggered.<\/p>\n<p>For example, if an attempt is made to trigger the flow using the user token of Carter, who is part of the tenant but not included in the Allowed user list, the request will be denied.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-40552\" style=\"border: 1px solid #000000; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/20OAuth-Authentication-in-Power-Automate.png\" alt=\"OAuth Authentication in Power Automate\" width=\"1728\" height=\"803\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/20OAuth-Authentication-in-Power-Automate.png 1728w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/20OAuth-Authentication-in-Power-Automate-300x139.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/20OAuth-Authentication-in-Power-Automate-1024x476.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/20OAuth-Authentication-in-Power-Automate-768x357.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/20OAuth-Authentication-in-Power-Automate-1536x714.png 1536w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2025\/03\/20OAuth-Authentication-in-Power-Automate-660x307.png 660w\" sizes=\"(max-width: 1728px) 100vw, 1728px\" \/><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>By using OAuth authentication, I was able to set up the workflow so that only specific users with their unique access tokens could trigger it. This means that no one outside the approved list can access or run the workflow meant for certain tasks. Now, with OAuth in place, only authorized users with the correct access tokens can interact with the workflow. This improves security and ensures that important business processes stay protected and under control. By adding OAuth authentication, I made it easier to secure my HTTP-triggered workflows while still allowing the right users to use them without any issues.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When working with workflows triggered by HTTP requests, you may face a common challenge, i.e., ensuring that only authorized users can start the workflow. In many cases, you might need to restrict access so that only specific users within your organization can trigger it. When a workflow is triggered by an HTTP request, controlling who\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2025\/03\/how-to-secure-http-requests-using-oauth-authentication-in-power-automate\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1985,2361],"tags":[1975],"class_list":["post-40525","post","type-post","status-publish","format-standard","hentry","category-power-automate","category-technical","tag-power-automate"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/40525","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=40525"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/40525\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=40525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=40525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=40525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}