You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/logic-apps/logic-apps-azure-functions.md
+34-36Lines changed: 34 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -225,39 +225,36 @@ To call existing functions from your logic app workflow, you can add functions l
225
225
226
226
---
227
227
228
-
<aname="call-logic-app"></a>
229
-
230
-
## Call workflows from functions
231
-
232
-
When you want to trigger a logic app workflow from inside a function, the workflow must start with a trigger that provides a callable endpoint. For example, you can start the workflow with the **HTTP**, **Request**, **Azure Queues**, or **Event Grid** trigger. Inside your function, send an HTTP POST request to the trigger's URL, and include the payload you want that workflow to process. For more information, review [Call, trigger, or nest logic app workflows](logic-apps-http-endpoint.md).
233
-
234
228
<aname="enable-authentication-functions"></a>
235
229
236
230
## Enable authentication for function calls
237
231
238
-
Your logic app resource can use a [managed identity](../active-directory/managed-identities-azure-resources/overview.md) (formerly known as Managed Service Identity or MSI) for authentication. A managed identity helps you authenticate access to resources protected by Azure Active Directory (Azure AD) without having to sign in and provide credentials or secrets. Azure manages this identity for you and helps secure your credentials because you don't have to provide or rotate secrets. Learn more about [Azure services that support managed identities for Azure AD authentication](../active-directory/managed-identities-azure-resources/services-support-managed-identities.md#azure-services-that-support-azure-ad-authentication).
232
+
To authenticate access to resources protected by Azure Active Directory (Azure AD), your logic app can use a [managed identity](../active-directory/managed-identities-azure-resources/overview.md) (formerly known as Managed Service Identity or MSI). This managed identity can authenticate access without having to sign in and provide credentials or secrets. Azure manages this identity for you and helps secure your credentials because you don't have to provide or rotate secrets. You can set up the system-assigned identity or a manually created, user-assigned identity on your logic app. The function that's called from your workflow can use the same identity for authentication.
233
+
234
+
For more information, review the following documentation:
239
235
240
-
If you set up your logic app to use the system-assigned identity or a manually created, user-assigned identity, your logic app can use that identity to authenticate access to your function. For more information about authentication support for Azure function calls in logic app workflows, review [Add authentication to outbound calls](logic-apps-securing-a-logic-app.md#add-authentication-outbound).
236
+
*[Authenticate access with managed identities](create-managed-service-identity.md)
237
+
*[Add authentication to outbound calls](logic-apps-securing-a-logic-app.md#add-authentication-outbound)
241
238
242
-
To set up and use your logic app's managed identity to call your function, follow these steps:
239
+
To set up your function app and function so they can use your logic app's managed identity, follow these high-level steps:
243
240
244
-
1.Enable the managed identity on your logic app resource, and set up that identity's access to the target resource. For more information, review [Authenticate access to Azure resources by using managed identities in Azure Logic Apps](create-managed-service-identity.md).
241
+
1.On your logic app resource, [enable and set up the managed identity](create-managed-service-identity.md) with access to the target resource.
245
242
246
-
1. Enable authentication for your function app and function by following these steps:
243
+
1. Enable authentication for your function app and function by completing these high-level tasks:
247
244
248
-
1.[Set up anonymous authentication for your function](#set-authentication-function-app).
245
+
1.[Set up your function for anonymous authentication](#set-authentication-function-app).
249
246
250
-
1.[Set up Azure AD authentication for your function app](#set-azure-ad-authentication).
247
+
1.[Set up your function app for Azure AD authentication](#set-azure-ad-authentication).
251
248
252
249
1.[Create an app registration for your function app](#create-app-registration).
253
250
254
-
1.[Get the application ID (resource ID) from your app registration](#find-application-id)to later use in the **Audience** property in your workflow.
251
+
1.[Get the application ID (resource ID) from your app registration](#find-application-id)for your function to use later in the **Audience** property.
255
252
256
253
<aname="set-authentication-function-app"></a>
257
254
258
-
## Set up anonymous authentication for your function
255
+
## Set up your function for anonymous authentication
259
256
260
-
To set up and use your logic app's managed identity to authenticate function calls, you must set your function's authentication level to anonymous. Otherwise, your logic app workflow throws a **BadRequest** error.
257
+
For your function to use your logic app's managed identity, you must set your function's authentication level to anonymous. Otherwise, your logic app workflow throws a **BadRequest** error.
261
258
262
259
1. In the [Azure portal](https://portal.azure.com), find and select your function app.
263
260
@@ -285,23 +282,20 @@ To set up and use your logic app's managed identity to authenticate function cal
285
282
286
283

287
284
288
-
1. When you're done, save your settings, and then continue to the next section.
289
-
290
-
<aname="set-azure-ad-authentication"></a>
285
+
1. When you're done, save your settings. Continue to the next section.
291
286
292
-
## Set up Azure AD authentication for your function app
287
+
## Find the required values to set up Azure AD authentication
293
288
294
-
Before you start this task, find and save the following values so that you can set up Azure AD authentication on your function app. The following steps show how to find these values.
289
+
Before you can set up your function app to use Azure AD authentication, you need to find and save the following values by following the steps in this section.
295
290
296
291
1.[Find the object (principal) ID for your logic app's managed identity](#find-object-id).
297
-
298
292
1.[Find the tenant ID for your Azure Active Directory (Azure AD)](#find-tenant-id).
299
293
300
294
<aname="find-object-id"></a>
301
295
302
-
### Step 1 - Find the object ID for your logic app's managed identity
296
+
### Find the object ID for your logic app's managed identity
303
297
304
-
If your logic app doesn't have a managed identity set up yet, [enable the managed identity for your logic app](create-managed-service-identity.md). Based on the whether you have a Consumption or Standard logic app resource, follow the respective steps:
298
+
Based on the whether you have a Consumption or Standard logic app resource, follow the respective steps:
305
299
306
300
#### [Consumption](#tab/consumption)
307
301
@@ -347,9 +341,9 @@ If your logic app doesn't have a managed identity set up yet, [enable the manage
347
341
348
342
<aname="find-tenant-id"></a>
349
343
350
-
### Step 2 - Find the tenant ID for your Azure AD
344
+
### Find the tenant ID for your Azure AD
351
345
352
-
For your Azure Active Directory (Azure AD), find the tenant ID. You can either run the PowerShell command named [**Get-AzureAccount**](/powershell/module/servicemanagement/azure.service/get-azureaccount), or in the Azure portal, follow these steps:
346
+
To find your Azure AD tenant ID, either run the PowerShell command named [**Get-AzureAccount**](/powershell/module/servicemanagement/azure.service/get-azureaccount), or in the Azure portal, follow these steps:
353
347
354
348
1. In the [Azure portal](https://portal.azure.com), open your Azure AD tenant. These steps use **Fabrikam** as the example tenant.
355
349
@@ -361,7 +355,7 @@ For your Azure Active Directory (Azure AD), find the tenant ID. You can either r
361
355
362
356
<aname="create-app-registration"></a>
363
357
364
-
### Step 3 - Create an app registration for your function app
358
+
## Create an app registration for your function app
365
359
366
360
Now you're ready to set up Azure AD authentication for your function app by creating an app registration. For more information, review [Configure your App Service or Azure Functions app to use Azure AD login](../app-service/configure-authentication-provider-aad.md#-enable-azure-active-directory-in-your-app-service-app).
367
361
@@ -373,17 +367,15 @@ Now you're ready to set up Azure AD authentication for your function app by crea
373
367
374
368
1. On the **Add an identity provider** pane, under **Basics**, from the **Identity provider** list, select **Microsoft**.
375
369
376
-
By default, under **App registration**, the option to create a new app registration is selected. You can change the name of the registration or the supported account types.
377
-
378
-
1. For **App registration type**, select **Provide the details of an existing app registration**, and provide the previously saved information:
370
+
1. Under **App registration**, for **App registration type**, select **Provide the details of an existing app registration**, and enter the values that you previously saved.
379
371
380
372
| Property | Required | Value | Description |
381
373
|----------|----------|-------|-------------|
382
374
|**Application (client) ID**| Yes | <*object-ID*> | The object ID for your logic app's managed identity. |
383
-
|**Client secret**| <*client-secret*> | No, but recommended | The secret value that the app uses to prove its identity when requesting a token. The client secret is created and stored as a slot-sticky [app setting](../app-service/configure-common.md#configure-app-settings) named `MICROSOFT_PROVIDER_AUTHENTICATION_SECRET`. If you want to manage the secret in Azure Key Vault, you can update this setting later to use Key Vault references. |
384
-
|**Issuer URL**| No |`https://sts.windows.net/<Azure-AD-tenant-ID>`|The issuer URL appended with your Azure AD tenant ID|
385
-
|**Allowed token audiences**| No | <*application-ID-URI*> | The application ID URI (resource ID) for the function app. In this example, the value is **https://management.azure.com**. Later, you can use the same URI in the **Audience** property when you [set up your function action in your workflow to use the managed identity for authentication](create-managed-service-identity.md#authenticate-access-with-identity). <p><p>**Important**: The application ID URI (resource ID) must exactly match the value that Azure AD expects, including any required trailing slashes. |
386
-
||||
375
+
|**Client secret**| <*client-secret*> | No, but recommended | The secret value that the app uses to prove its identity when requesting a token. With a client secret, hybrid flow is used and the App Service returns access and refresh tokens. When the client secret is not set, implicit flow is used and only an ID token is returned. These tokens are sent by the provider and stored in the EasyAuth token store. <br><br>The client secret is created and stored as a slot-sticky [application setting](../app-service/configure-common.md#configure-app-settings) named **MICROSOFT_PROVIDER_AUTHENTICATION_SECRET**. To manage the secret in Azure Key Vault instead, you can update this setting later to use [Key Vault references](../app-service/app-service-key-vault-references.md). |
376
+
|**Issuer URL**| No |**<*authentication-endpoint-URL*>/<*Azure-AD-tenant-ID*>/v2.0**|This URL redirects users to the correct Azure AD tenant and downloads the appropriate metadata to determine the appropriate token signing keys and token issuer claim value. For apps that use Azure AD v1, omit **/v2.0** from the URL. <br><br>For this scenario, use the following URL: **`https://sts.windows.net/`<*Azure-AD-tenant-ID*>**|
377
+
|**Allowed token audiences**| No | <*application-ID-URI*> | The application ID URI (resource ID) for the function app. For a cloud or server app where you want to allow authentication tokens from a web app, add the application ID URI for the web app. The configured client ID is always implicitly considered as an allowed audience. <br><br>For this scenario, the value is **https://management.azure.com**. Later, you can use the same URI in the **Audience** property when you [set up your function action in your workflow to use the managed identity](create-managed-service-identity.md#authenticate-access-with-identity). <p><p>**Important**: The application ID URI (resource ID) must exactly match the value that Azure AD expects, including any required trailing slashes. |
378
+
|||||
387
379
388
380
At this point, your version looks similar to this example:
389
381
@@ -395,12 +387,18 @@ Now you're ready to set up Azure AD authentication for your function app by crea
395
387
396
388
1. To finish creating the app registration, select **Add**.
397
389
398
-
When you're done, the **Authentication** page now lists the identity provider and app ID (client ID) for the app registration. You're can now use this app registration for authentication in your function app.
390
+
When you're done, the **Authentication** page now lists the identity provider and app ID (client ID) for the app registration. Your function app can now this app registration for authentication.
399
391
400
-
1. Copy the app ID (client ID) for the app registration to later use in your workflow.
392
+
1. Copy the app registration's app ID (client ID) for later use in your workflow.
401
393
402
394
1. Return to the designer and follow the [steps to authenticate access with the managed identity](create-managed-service-identity.md#authenticate-access-with-identity) by using the built-in Azure Functions action.
403
395
396
+
<aname="call-logic-app-workflow"></a>
397
+
398
+
## Call workflows from functions
399
+
400
+
To trigger a logic app workflow from inside a function, the workflow must start with a trigger that provides a callable endpoint. For example, you can start the workflow with the **HTTP**, **Request**, **Azure Queues**, or **Event Grid** trigger. Inside your function, send an HTTP POST request to the trigger's URL and include the payload you want that workflow to process. For more information, review [Call, trigger, or nest logic app workflows](logic-apps-http-endpoint.md).
401
+
404
402
## Next steps
405
403
406
404
*[Authentication access to Azure resources with managed identities in Azure Logic Apps](create-managed-service-identity.md#authentication-access-with-identity)
0 commit comments