I have an 401 Unauthorized when I try to make a post request. The problem is that it's working using the Graph Explorer but I have this error using the access token given by this method:
let getTokenPopup = request => {
return myMSALObj.acquireTokenSilent(request).catch(error => {
return myMSALObj
.acquireTokenPopup(request)
.then(tokenResponse => {
return tokenResponse;
})
.catch(error => {
console.log(error);
});
})};
This is the scope using to the access token:
export const tokenRequest = {
scopes: ["User.Read","email","profile","openid","Calendars.ReadWrite"]};