'Azure Logic App - how to call an API authenticated by Azure AD

I have an ASP.NET MVC application that is secured by Azure AD and exposes a few APIs for me.

I would like to invoke these APIs using Logic Apps (for a few reasons).

I have no idea how I can invoke these authenticated APIs in Logic Apps using the Designer. I basically want to invoke the API using a specific user such that I can lock down the APIs to one or two users instead of the entire tenancy.

This is the logic app:

enter image description here

I'm not sure what the Authentication Type should be that will allow me to invoke the API.

The API simply looks like this:

[Authorize]
[Route("api/[controller]/[action]")]
[ApiController]

And simply exposes to some GET requests.

Any ideas? Happy to elaborate if this doesn't make sense.



Solution 1:[1]

You can achieve the above requirement by adding managed identity to your logic app as suggested by @Skin,

Kindly note that before adding managed identity , enable managed idenity provider to your logic app then select the authentication type as managed identity.

SCREENSHOT FOR REFERENCE:-

enter image description here


enter image description here

For more information please refer the below Links:-

MICROSOFT DOCUMENTATION:- Increase security for calls to custom APIs from Azure Logic Apps

SO THREAD:- Calling an Azure AD Protected API from Logic App using Managed Identity

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 AjayKumarGhose-MT