@azure/graph

Publish date: 2024-06-08

Azure GraphRbacManagementClient SDK for JavaScript

This package contains an isomorphic SDK for GraphRbacManagementClient.

Currently supported environments

How to Install

npm install @azure/graph

How to use

nodejs - Authentication, client creation and get signedInUser as an example written in TypeScript.

Install @azure/ms-rest-nodeauth
npm install @azure/ms-rest-nodeauth
Sample code
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; import { GraphRbacManagementClient, GraphRbacManagementModels, GraphRbacManagementMappers } from "@azure/graph"; const tenantId = "<Tenant_Id>"; 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) => { console.log("The result is:"); console.log(result); }); }).catch((err) => { console.error(err); });

browser - Authentication, client creation and get signedInUser as an example written in JavaScript.

Install @azure/ms-rest-browserauth
npm install @azure/ms-rest-browserauth
Sample code

See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.

Related projects

Impressions

ncG1vNJzZmiZqqq%2Fpr%2FDpJuom6Njr627wWeaqKqVY8SqusOorqxmnprBcHDWnploopGrrrSv0aKnrWeRr8KzsYygqZqomGSCb3yNaWaippSaxW%2B006aj