MS Teams app manifest file Tenant restriction

断了今生、忘了曾经 提交于 2021-02-11 07:22:26

问题


I created the bot application and created the manifest file for it. I added it to the Microsoft teams and it is working fine. So if I use that manifest file with the other tenant account then also that app will be added and working. I don't want it to be like this. If the other tenant people tries to add the manifest it should not work or added. How to give tenant restriction in the manifest file? I am attaching my manifest file also.

{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json",
"manifestVersion": "1.5",
"version": "1.0.0",
"id": "<id>",
"packageName": "com.example.myapp",
"developer": {
    "name": "AzS",
    "websiteUrl": "https://teams.com",
    "privacyUrl": "https://teams.com/privacy",
    "termsOfUseUrl": "https://teams.com/termsofuse"
},
"icons": {
    "color": "color.png",
    "outline": "outline.png"
},
"name": {
    "short": "test Bot",
    "full": "test App"
},
"description": {
    "short": "This is a  test bot",
    "full": " bot"
},
"accentColor": "#FFFFFF",
"bots": [
    {
        "botId": "<botid>",
        "scopes": [
            "team",
            "groupchat",
            "personal"
        ],
        "supportsFiles": true,
        "isNotificationOnly": false
    }
],
"permissions": [
    "identity",
    "messageTeamMembers"
],
"validDomains": []

}


回答1:


Aside from my question in the comments above, Microsoft provide a middleware as part of the bot framework itself, to filter for specific tenant id(s). Have a look at teamsTenantFilteringMiddleware

(The above is for Node). For interest, here is the C# version as well.



来源:https://stackoverflow.com/questions/61382080/ms-teams-app-manifest-file-tenant-restriction

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!