I am currently using oAuth to get a token by Calendars.ReadWrite
scope but it works for all calendars that the user has. This is my code:
const PCA = new PublicClientApplication({
auth: {
clientId: "***",
authority: "https://login.microsoftonline.com/common",
redirectUri: "http://localhost:8080/"
}
});
PCA.loginPopup({ scopes: ["User.Read", "Calendars.ReadWrite"] })
.then((response) => {
console.log(response.accessToken)
})
.catch(function (error) {
console.log(error);
});
I was wondering, is there any way to get token based on a specific calendar? I would like to have a token which only works for the same calendar that user chose and does not work for other calendars that the user has.