我已经完成登录并使用 msal-browser.min.js 在 JavaScript 文件中获取访问令牌,我可以使用此令牌吗?
谢谢你。
<!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>