You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Calling TeamsUserCredential getToken with a scope as parameter generates the error "Error - Failed to get access token cache silently, please login first: you need login first before get access token.".
It works well if we specify empty string: getToken("")
Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.
Describe the bug
Calling TeamsUserCredential getToken with a scope as parameter generates the error "Error - Failed to get access token cache silently, please login first: you need login first before get access token.".
It works well if we specify empty string: getToken("")
To Reproduce
Steps to reproduce the behavior:
const { teamsUserCredential } = useContext(TeamsFxContext);
const { loading, data, error } = useData(async () => {
if (teamsUserCredential) {
const userInfo = await teamsUserCredential.getUserInfo();
const token = await teamsUserCredential.getToken(["access_as_user"]);
return token;
}
});
Expected behavior
A token should by returned for a specific scope
Screenshots
VS Code Extension Information (please complete the following information):
The text was updated successfully, but these errors were encountered: