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
Depending on your API version, you have to take [different steps](qs-configure-template-windows-vm.md#user-assigned-managed-identity). If your apiVersion is 2018-06-01, your user-assigned managed identities are stored in the userAssignedIdentities dictionary format and the```<identityName>``` value is the name of a variable that you define in the variables section of your template. In the variable, you point to the user assigned managed identity that you want to assign.
180
+
Depending on your API version, you have to take [different steps](qs-configure-template-windows-vm.md#user-assigned-managed-identity). If your apiVersion is 2018-06-01, your user-assigned managed identities are stored in the userAssignedIdentities dictionary format. The```<identityName>``` value is the name of a variable that you define in the variables section of your template. In the variable, you point to the user assigned managed identity that you want to assign.
181
181
182
182
```json
183
183
"variables": {
@@ -310,7 +310,7 @@ To use the sample below, you need to have the following NuGet packages:
310
310
- Microsoft.Azure.Cosmos
311
311
- Microsoft.Azure.Management.CosmosDB
312
312
313
-
In addition to the NuGet packages above, you also need to enable **Include prerelease** and then add **Azure.ResourceManager.CosmosDB**.
313
+
In addition to the NuGet packages above, you also need to enable **Include prerelease** and then add **Azure.ResourceManager.CosmosDB**.
314
314
315
315
```csharp
316
316
usingAzure.Identity;
@@ -326,44 +326,53 @@ namespace MITest
326
326
{
327
327
staticasyncTaskMain(string[] args)
328
328
{
329
+
// Replace the placeholders with your own values
329
330
varsubscriptionId="Your subscription ID";
330
331
varresourceGroupName="You resource group";
331
332
varaccountName="Cosmos DB Account name";
332
333
vardatabaseName="mi-test";
333
334
varcontainerName="container01";
334
335
336
+
// Authenticate to Azure using Managed Identity (system-assigned or user-assigned)
0 commit comments