How to use msal authentication token in the toolkit?

298 views Asked by At

I would like to be able to use the authentication token that I get when logging into my webapp through msal. If I use the toolkit I am forced to log in again (mgt-login). How can I bypass the second login? Thanks.

1

There are 1 answers

0
Shane Weaver On

It sounds like you are already using msal.js in your application, correct?

This feature is not yet available, but we added the capability to configure an new MsalProvider with an existing UserAgentApplication object from msal.js.

This capability was added recently by a community member and is available in the latest preview: https://github.com/microsoftgraph/microsoft-graph-toolkit/releases/tag/v2.0.0-preview.1

You can find details on this new feature in the mgt preview docs here: https://github.com/microsoftgraph/microsoft-graph-docs/blob/mgt/next/concepts/toolkit/providers/msal.md#pass-an-existing-useragentapplication-in-the-useragentapplication-property