MicrosoftDocs / msteams-docs

Source for the Microsoft Teams developer platform documentation.
https://aka.ms/teamsdev
Creative Commons Attribution 4.0 International
288 stars 511 forks source link

ReplyToId on mobile clients #11844

Open Whity2507 opened 1 day ago

Whity2507 commented 1 day ago

Steps to reproduce

Hi, In our Teams Bot we want to update the sign in card after the user has authenticated. So we call turnContext.Activity.ReplyToId in TeamsActivityHandler.OnTeamsSigninVerifyStateAsync to get the activityId for UpdateActivityAsync. When a user logs in from the desktop client, in Activity.ReplyToId we get a correct id like “1732088066556”. But when he logs in from the mobile client Activity.ReplyToId is “0”. This behavior does not apply to AdaptiveCard, for them Activity.ReplyToId is correct from both desktop and mobile clients.

Expected behavior

turnContext.Activity.ReplyToId is equal for both mobile and desktop clients.

Actual behavior

turnContext.Activity.ReplyToId is always "0" when called from mobile client.

Error details

No response

sayali-MSFT commented 18 hours ago

Thank you for your inquiry about your Teams app development issue! To assist you better, could you please provide the following details? Teams Client Version: What version of the Teams client are you using? Code Snippets: Relevant code snippets that illustrate the issue.

Whity2507 commented 16 hours ago

Windows client "About" section:

Android client "About" section:

Microsoft.Bot framework 4.22.9 (C#)

internal class TeamsActivityHandler : Microsoft.Bot.Builder.Teams.TeamsActivityHandler
{
    protected override Task OnTeamsSigninVerifyStateAsync(ITurnContext<IInvokeActivity> turnContext, CancellationToken cancellationToken)
    {
        var test = turnContext.Activity.ReplyToId; // test = "0" for mobile and test = "1732170698981" for desktop
        ...
    }
    ...
    }

Sign In card: image where _adapter is Microsoft.Bot.Builder.Integration.AspNet.Core.CloudAdapter