简体   繁体   中英

MS Teams Bot sign-in not working, says "This action can't be performed since the app does not exist or has been uninstalled."

I am creating a simple MS Teams messaging bot that requires auth/sign-in.

I am using https://smba.trafficmanager.net/amer/v3/conversations/{conversationId}/activities to send a non-reply bot message to user that includes a hero card with a sign-in button.

The body looks somewhat like this:

{
"type": "message",
"from": {
    "id": "abc",
    "name": "messaging-bot"
},
"conversation": {
    "id": "789",
    "name": "test",
    "tenantId": "456",
    "role": "bot",
    "conversationType": "personal"
},
"recipient": {
    "id": "123",
    "name": "test"
},
"attachments": [
    {
        "contentType": "application/vnd.microsoft.card.hero",
        "content": {
            "title": "title goes here",
            "subtitle": "subtitle goes here",
            "text": "descriptive text goes here",
            "buttons": [
                {
                    "type": "signin",
                    "title": "Click me to sign in",
                    "value": "<my-signin-url>"
                }
            ]
        }
    }
]

}

When user receives hero card and clicks sign in button, user gets the following error:

This action can't be performed since the app does not exist or has been uninstalled.

I have added my sign-in domain to valid domains, and uploaded app package to MS Teams, so not sure why I am getting this error.

The app is created through Developer Portal in Ms Teams. For now, we are just creating a simple messaging app that relies on the bot messaging endpoint

May someone help with this?

If you are using Microsoft AD, Please add below in valid domain section of your app manifest:

token.botframework.com
login.microsoftonline.com

Quick update on answer. I found that installing/uninstalling app when sideloading app is a bit buggy. Things worked after I closed my MS Teams client and re-opened it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM