Skip to content

Commit e187dda

Browse files
committed
Use empty parameter
1 parent e2d95cc commit e187dda

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

articles/digital-twins/how-to-authenticate-client.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ In an Azure function, you can use the managed identity credentials like this:
8686

8787
:::code language="csharp" source="~/digital-twins-docs-samples/sdks/csharp/authentication.cs" id="ManagedIdentityCredential":::
8888

89-
If you're using a user-assigned identity for the function app, enter the client ID of the user-assigned identity as a parameter when creating the credential. If you're using the function app's system-assigned identity to authenticate, you can leave the parameter empty.
89+
Leaving the parameter empty as shown above will return the credential for the function app's system-assigned identity, if it has one. To specify a user-assigned identity instead, pass the user-assigned identity's **client ID** into the parameter.
9090

9191
### InteractiveBrowserCredential method
9292

@@ -124,10 +124,9 @@ When writing the Azure function, consider adding these variables and code to you
124124

125125
* **Managed identity credentials.** Create a managed identity credential that your function will use to access Azure Digital Twins.
126126

127-
If you're using a user-assigned identity for the function app, enter the client ID of the user-assigned identity as a parameter when creating the credential, as shown below:
128127
:::code language="csharp" source="~/digital-twins-docs-samples/sdks/csharp/adtIngestFunctionSample.cs" id="ManagedIdentityCredential":::
129128

130-
If you're using the function app's system-assigned identity to authenticate, you can leave the parameter empty.
129+
Leaving the parameter empty as shown above will return the credential for the function app's system-assigned identity, if it has one. To specify a user-assigned identity instead, pass the user-assigned identity's **client ID** into the parameter.
131130

132131
Later, after publishing the function, you'll make sure the function's identity has permission to access the Azure Digital Twins APIs. For instructions on how to do so, skip ahead to [Assign an access role](#assign-an-access-role).
133132

0 commit comments

Comments
 (0)