Skip to content

Conversation

@khill-fbmc
Copy link
Contributor

Small syntax error in example

@baywet baywet enabled auto-merge January 17, 2023 20:18
@baywet
Copy link
Member

baywet commented Jan 17, 2023

thanks for the contribution!

@baywet baywet merged commit f3e9ff3 into microsoftgraph:dev Jan 17, 2023
@khill-fbmc
Copy link
Contributor Author

I also just noticed there should probably be semicolons at the end of options and instead of a comma after the authProvider

const options: AuthCodeMSALBrowserAuthenticationProviderOptions = {
    account: account, // the AccountInfo instance to acquire the token for.
    interactionType: InteractionType.PopUp , // msal-browser InteractionType
    scopes: ["user.read", "mail.send"] // example of the scopes to be passed
}
//^======HERE

// Pass the PublicClientApplication instance from step 2 to create AuthCodeMSALBrowserAuthenticationProvider instance
const authProvider: new AuthCodeMSALBrowserAuthenticationProvider(publicClientApplication, options), 
// =================================================== AND HERE====================================^

// Initialize the Graph client
const graphClient = Client.initWithMiddleware({
    authprovider
});

@baywet
Copy link
Member

baywet commented Jan 17, 2023

would you mind submitting another pull request to address that? thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants