I have a microsoft teams app, built with the yeoman teams generator.
The app works fine in teams (web), but not in the desktop client.
The issue seems to be related to this call (+/- the same as the sample):
private async getAccessToken(promptConsent: boolean = false): Promise<string> {
try{
let queryParams = {
client_id: "teams-app",
response_type: "id_token token",
response_mode: "fragment",
redirect_uri: window.location.origin + "/auth-end.html",
nonce: this.uuidv4()
};
return new Promise<string>((resolve, reject) => {
microsoftTeams.authentication.authenticate({
url: "https://[keycloakURL]/auth/realms/EV/protocol/openid-connect/auth?"+this.toQueryString(queryParams),
width: 600,
height: 535,
successCallback: (accessToken: string) => {
resolve(accessToken);
},
failureCallback: (reason) => {
reject(reason);
}
});
});
}catch(e){
console.log(e);
return "";
}
}
I can get neither the failure reason, nor the access token... But in the web, the app works fines...
Any idea? Or any suggestion to debug (I've tried with the Microsoft Teams Client Debugger, but no luck...)