0

I have already finished login and get the access token in JavaScript file with msal-browser.min.js, is that possible that I use this token for ?

Thank you.

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>AAD Test</title>

    <script src="https://alcdn.msauth.net/browser/2.12.0/js/msal-browser.min.js"></script>
    <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
    <script src="https://unpkg.com/@microsoft/mgt/dist/bundle/mgt-loader.js"></script>

</head>

<body>
    <script>
        // access token is here after page load.
        let accessToken="";
    </script>
    <div>
        <span id="username"></span>
        <button type="button" id="Sign Out" onclick="signOut()">Sign Out</button>
    </div>

    <script src="./authConfig.js"></script>
    <script src="./authRedirect.js"></script>
    <script src="./graph.js"></script>
    <script src="./common.js"></script>
    
    <mgt-people-picker></mgt-people-picker>

</body>

</html>
qwer11121
  • 138
  • 2
  • 15

1 Answers1

0

You can use the SimpleProvider with your access token.

Nikola Metulev
  • 566
  • 3
  • 7