Skip to content

Commit 6df5acc

Browse files
Update Readme
1 parent 27fc5f6 commit 6df5acc

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,16 @@ Refer devDependencies in [package.json](./package.json) for the compatible msal
6060
```
6161

6262
```typescript
63-
const clientID = "your_client_id"; // Client Id of the registered application
64-
const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes
63+
const clientId = "your_client_id"; // Client Id of the registered application
64+
const callback = (errorDesc, token, error, tokenType) => {};
65+
// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options
6566
const options = {
66-
// An Optional options for initializing the MSAL @see https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics#configuration-options
6767
redirectUri: "Your redirect URI",
6868
};
69-
const authProvider = new MicrosoftGraph.MSALAuthenticationProvider(clientId, graphScopes, options);
69+
const graphScopes = ["user.read", "mail.send"]; // An array of graph scopes
70+
71+
const userAgentApplication = new Msal.UserAgentApplication(clientId, undefined, callback, options);
72+
const authProvider = new MicrosoftGraph.MSALAuthenticationProvider(userAgentApplication, graphScopes);
7073
```
7174

7275
#### Creating an instance of MSALAuthenticationProvider in node environment

0 commit comments

Comments
 (0)