diff --git a/sdk/graphrbac/graph/README.md b/sdk/graphrbac/graph/README.md index bc8a44d19e8e..5efe763145dc 100644 --- a/sdk/graphrbac/graph/README.md +++ b/sdk/graphrbac/graph/README.md @@ -26,14 +26,15 @@ npm install @azure/ms-rest-nodeauth ##### Sample code ```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; import { GraphRbacManagementClient, GraphRbacManagementModels, GraphRbacManagementMappers } from "@azure/graph"; -const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; +const tenantId = ""; -msRestNodeAuth.interactiveLogin({{ tokenAudience: "https://graph.windows.net" }}).then((creds) => { - const client = new GraphRbacManagementClient(creds, subscriptionId, { +msRestNodeAuth.interactiveLogin({ + tokenAudience: "https://graph.windows.net", + domain: tenantId +}).then((creds) => { + const client = new GraphRbacManagementClient(creds, tenantId, { baseUri: "https://graph.windows.net" }); client.signedInUser.get().then((result) => { @@ -68,7 +69,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to