![](/img/trans.png)
[英]Authenticate from Azure Logic app to Azure Function using Managed Identity
[英]Calling an Azure AD Protected API from Logic App using Managed Identity
我們有一個托管在本地的 Azure AD Protect API。 我們需要從 Logic App 調用此 API。 我們目前在應用注冊中為此邏輯應用創建或注冊了一個新的客戶端應用,並提供了必要的權限並調用了傳遞承載令牌的 API。
我的問題是,有沒有一種方法可以利用邏輯應用程序的托管標識(用戶分配的或系統分配的)來調用 API?
就在這里。 我寫了一篇關於這個主題的文章(雖然它不是特定於邏輯應用程序): https : //joonasw.net/view/calling-your-apis-with-aad-msi-using-app-permissions 。
您將需要創建一個appRoleAssignment ,為您的托管標識服務主體提供應用程序權限。 為此,我們必須使用 PowerShell 或 Microsoft Graph API。 使用Azure AD PowerShell ,我們可以做到:
Connect-AzureAD
New-AzureADServiceAppRoleAssignment -ObjectId $miSpId -Id $appRoleId -PrincipalId $miSpId -ResourceId $targetApiSpId
我們需要找到 3 個參數:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.