Skip to content

Commit dd0e70e

Browse files
committed
Update nested readme
1 parent 91923fc commit dd0e70e

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

packages/msgraph-sdk-admin/README.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,10 @@ npm install @microsoft/msgraph-sdk-admin
2626
Here is an example of how to use the package:
2727

2828
```typescript
29-
import { createGraphServiceClient, GraphRequestAdapter } from "@microsoft/msgraph-sdk";
30-
import { AzureIdentityAuthenticationProvider } from "@microsoft/kiota-authentication-azure";
31-
import { ClientSecretCredential } from "@azure/identity";
3229
import "@microsoft/msgraph-sdk-admin"
3330

34-
// Create a credential using ClientSecretCredential
35-
const credential = new ClientSecretCredential(
36-
'YOUR_TENANT_ID',
37-
'YOUR_CLIENT_ID',
38-
'YOUR_CLIENT_SECRET',
39-
);
40-
41-
// Create an authentication provider
42-
const authProvider = new AzureIdentityAuthenticationProvider(credential, ["https://graph.microsoft.com/.default"]);
43-
44-
// Create a request adapter
45-
const requestAdapter = new GraphRequestAdapter(authProvider);
46-
47-
// Create a GraphServiceClient
48-
const graphServiceClient = createGraphServiceClient(requestAdapter);
49-
5031
// Use the GraphServiceClient to make requests by including the appropriate API calls package
51-
// e.g graphServiceClient.admin.(complete your call)
32+
const admin = graphServiceClient.admin.get();
5233

5334
```
5435

0 commit comments

Comments
 (0)