Brett Mealor
Brett Mealor

Reputation: 111

How can I use OAuth 2.0 Authentication in an Azure Logic App?

I'm trying to create a simple logic app with an FTP trigger which then pipes any uploaded file content to a Web API that I have hosted in Azure and secured using the OAuth 2.0 Client Credentials grant flow.

How does one go about configuring the OAuth 2.0 authentication within the logic app?

What I've done so far is added a FTP trigger which feeds into a HTTP Post action to a Web API endpoint expecting the file content. I see that there is an input for the authentication header, however I would still need to get the token from the authorization endpoint before I am able to specify the header value.

Should I be manually adding extra steps to manually retrieve and supply the token value, or is there a simpler method of referencing a secured endpoint?

Upvotes: 4

Views: 19671

Answers (2)

Kleanthi
Kleanthi

Reputation: 1

In case anyone is trying OAuth to Business Centra, the 'audience' should be populated with the Return URI that is configured in the Azure App Registration. As per this article below: https://www.tharangac.com/2022/02/oauth-part-03-logic-app-oauth-and-business-central.html enter image description here

Upvotes: 0

antmeehan
antmeehan

Reputation: 933

If you are using Azure AD then you should be able to follow the these instructions

Part 3 has the specific configuration within your Logic App:

Part 3: Populate the Authorization section in the Logic app

In the Authorization section of the HTTP action: {"tenant":"<<tenantId>>", "audience":"<<clientID from Part 2>>", "clientId":"<<clientID from Part 1>>","secret": "<<Password or Key from Part 1>>","type":"ActiveDirectoryOAuth" }

Upvotes: 3

Related Questions