[英]MS Teams tab app login is not working on IOS Teams App
I am building a Microsoft Teams tab app ( https://docs.microsoft.com/en-us/microsoftteams/platform/tabs/what-are-tabs ) using React JS.我正在使用 React JS 构建 Microsoft Teams 选项卡应用程序( https://docs.microsoft.com/en-us/microsoftteams/platform/tabs/what-are-tabs )。 My application has a login form that logs user in with Teams asking for additional permissions then send the access token back to the backend.
我的应用程序有一个登录表单,该表单将用户登录到 Teams 中,请求额外的权限,然后将访问令牌发送回后端。 My login form is working fine on Web and Desktop app version of the MS Teams.
我的登录表单在 MS Teams 的 Web 和桌面应用程序版本上运行良好。 But it is not working on IOS MS Teams app.
但它不适用于 IOS MS Teams 应用程序。
This is how I login the user.这就是我登录用户的方式。
import {TeamsFx} from '@microsoft/teamsfx';
// rest of the code hidden
try {
let teamsfx = new TeamsFx();
const credentials = await teamsfs.getCredential();
const accessToken = await credentials.getToken([ 'Group.Read.All', 'User.Read' ]);
} catch (e) {
console.log(e.message)
}
when I login on the IOS Teams app, I am getting this error.当我登录 IOS Teams 应用程序时,我收到此错误。
Unable to generate the SSO token: App is neither whitelisted nor app resource matches current domain.
What is the potential cause of the issue and how can I fix it?问题的潜在原因是什么,我该如何解决?
You need to set the app uri id as api://{fullDomain}/{appId}
for you to be able to get tokens.您需要将应用程序 uri id 设置为
api://{fullDomain}/{appId}
才能获取令牌。 And because you're getting extra permissions, you need to make sure you are getting consent.而且由于您获得了额外的权限,因此您需要确保获得同意。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.