Skip to content

Commit 8d03bc1

Browse files
committed
rollup new entry point, token cred auth provider, deprecate implicitmsal
1 parent bb319a5 commit 8d03bc1

File tree

8 files changed

+267
-158
lines changed

8 files changed

+267
-158
lines changed

docs/TokenCredentialAuthenticationProvider.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,19 @@ const client = Client.initWithMiddleware({
5454
});
5555
const res = await client.api("/users/").get();
5656
```
57+
58+
The `TokenCredentialAuthenticationProvider` and the `TokenCredentialAuthenticationProviderOptions` are bundled into the `lib/graph-client-tokenCredentialAuthProvider.js` file in an `iife` format.
59+
60+
The browser use of the file is as follows:
61+
62+
```javascript
63+
// include the script
64+
<script type="text/javascript" src="<PATH_TO_SCRIPT>/graph-client-tokenCredentialAuthProvider.js"></script>;
65+
66+
// create an authProvider
67+
var authProvider = new MicrosoftGraph.TokenCredentialAuthProvider.TokenCredentialAuthenticationProvider(tokenCred, { scopes: scopes });
68+
69+
client = MicrosoftGraph.Client.initWithMiddleware({
70+
authProvider: auth,
71+
});
72+
```

package-lock.json

Lines changed: 123 additions & 89 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)