MS Teams 获得名册返回“该机器人不是对话名册的一部分." [英] MS Teams Get Roster returns "The bot is not part of the conversation roster."

本文介绍了MS Teams 获得名册返回“该机器人不是对话名册的一部分."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取 MS Teams 烘焙师/用户个人资料.以下是我正在拨打的邮递员电话顺序:

I am trying to fetch the MS Teams roaster / user profile. Below are the sequence of Postman calls I am making:

生成的访问令牌:https://login.microsoftonline.com/botframework.com/oauth2/v2.0/令牌

生成的用户访问令牌:https://login.microsoftonline.com/{{TenantId}}/oauth2/v2.0/token获取

Generated User Access Token: https://login.microsoftonline.com/{{TenantId}}/oauth2/v2.0/token Get

我加入的团队:https://graph.microsoft.com/v1.0/me/joinedTeams

获取内部团队编号:https://graph.microsoft.com/v1.0/teams/{{TeamId}}/频道

Get Internal Team Id:https://graph.microsoft.com/v1.0/teams/{{TeamId}}/channels

获取名册/用户个人资料:https://{{ServiceUrl}}/v3/conversations/{{tId}}/members/

Fetch Roster/user profile:https://{{ServiceUrl}}/v3/conversations/{{tId}}/members/

一切正常,但今天我收到 403 禁止错误

Everything was working fine, but today I am getting 403 forbidden error

{
    "error": {
        "code": "BotNotInConversationRoster",
        "message": "The bot is not part of the conversation roster."
    }
}

请注意,我可以与机器人通信.

Please note that I am able to communicate with the bot.

以下是我为委托和应用程序提供的权限目录.阅读.全部组读全部Group.ReadWrite.All用户读用户阅读全部User.ReadBasic.All

Below are the permissions that I have provided for delegate and application Directory.Read.All Group.Read.All Group.ReadWrite.All User.Read User.Read.All User.ReadBasic.All

有什么建议可以解决这个问题吗?

Any suggestions to fix the same?

推荐答案

请注意,您最后一次调用serviceurl",显然不是图表的一部分.因此,它的身份验证是不同的.在这种情况下,Teams 将其作为机器人进行身份验证,并且它需要某些权限.例如,必须将机器人安装到相关团队才能获得该团队的花名册.你说它以前工作过 - 是在同一个团队中吗?如果没有,则需要将机器人添加到该团队.如果是",那么该机器人是否已被某人从团队中移除?

Notice that your last call, the one to "serviceurl", is NOT part of the Graph, obviously. As a result, it's authentication is different. In this case, Teams is authenticating it as a bot, and it needs certain rights. For instance, the bot MUST be installed to the Team in question in order to get the roster for that Team. You say it was working before - is that in the same Team? If not, the bot needs to be added to that Team. If "yes", then perhaps the bot was removed from the Team by someone?

这篇关于MS Teams 获得名册返回“该机器人不是对话名册的一部分."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆