Skip to content

Commit fa417e2

Browse files
committed
Fix JS code
1 parent 5c62ec1 commit fa417e2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

articles/storage/common/multiple-identity-scenarios.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,8 @@ public class ExampleService {
540540
```javascript
541541
import { DefaultAzureCredential } from "@azure/identity";
542542
import { BlobServiceClient } from "@azure/storage-blob";
543-
import { KeyClient } from "@azure/keyvault-keys";
543+
import { CosmosClient } from "@azure/cosmos";
544+
import { sql } from "mssql";
544545
545546
// Get the first user-assigned managed identity client ID to connect to shared storage
546547
const clientIdStorage = process.env.MANAGED_IDENTITY_CLIENT_ID_STORAGE;
@@ -579,8 +580,8 @@ public class ExampleService {
579580
})
580581
});
581582
582-
// Open a connection to Azure SQL using a managed identity with mssql package
583-
// mssql reads the environment variables to get the managed identity
583+
// Open a connection to Azure SQL using a managed identity with mssql package.
584+
// mssql reads the environment variables to get the managed identity.
584585
const server = process.env.AZURE_SQL_SERVER;
585586
const database = process.env.AZURE_SQL_DATABASE;
586587
const port = parseInt(process.env.AZURE_SQL_PORT);
@@ -603,7 +604,7 @@ public class ExampleService {
603604
604605
---
605606
606-
You can also associate a user-assigned managed identity and a system-assigned managed identity to a resource simultaneously. This can be useful in scenarios where all of the apps require access to the same shared services, but one of the apps also has a very specific dependency on an additional service. Using a system-assigned identity also ensures that the identity tied to that specific app is deleted when the app is deleted, which can help keep your environment clean.
607+
You can also associate a user-assigned managed identity and a system-assigned managed identity to a resource simultaneously. This can be useful in scenarios where all of the apps require access to the same shared services, but one of the apps also has a very specific dependency on an additional service. Using a system-assigned managed identity also ensures that the identity tied to that specific app is deleted when the app is deleted, which can help keep your environment clean.
607608
608609
:::image type="content" lightbox="media/user-and-system-assigned-identities-small.png" source="media/user-and-system-assigned-identities.png" alt-text="Diagram showing user-assigned and system-assigned managed identities.":::
609610

0 commit comments

Comments
 (0)