Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using adaptive cards #174

Open
chandrakanthkannam opened this issue Jul 8, 2022 · 4 comments
Open

Using adaptive cards #174

chandrakanthkannam opened this issue Jul 8, 2022 · 4 comments
Labels
card format/adaptivecard Adaptive Card support help wanted Extra attention is needed question Further information is requested

Comments

@chandrakanthkannam
Copy link

Hi,

I have tried using adaptive cards, when we use adaptivecard.NewMessage().Mention(), how can i mention custom bot which is configured with the channel I'm posting to. Please advice. Thanks

@atc0005
Copy link
Owner

atc0005 commented Jul 10, 2022

Hi @chandrakanthkannam,

In short, I don't know for sure. If it's possible using this library I'd like to showcase it to assist others with the same question in the future.

Based on earlier research, it looks like there are two ID forms supported by Microsoft Teams:

Example of an ID:

  • 2b450b8e-1db6-42cb-a545-1b05eb8a358b

Example of a User Principal Name (UPN):

The https://docs.microsoft.com/en-us/powershell/module/azuread/get-azureaduser?view=azureadps-2.0 doc showed how to retrieve the ID values using PowerShell cmdlets.

Some potentially relevant official documentation:


Some examples for mentioning actual users are available here:

@atc0005 atc0005 added the question Further information is requested label Jul 11, 2022
@atc0005 atc0005 added the help wanted Extra attention is needed label Jul 22, 2022
@atc0005
Copy link
Owner

atc0005 commented Jul 22, 2022

I've not tested the steps, but this guide:

https://d365demystified.com/2021/03/17/tag-a-user-in-a-microsoft-teams-post-made-using-power-automate/

walks you through the process of getting a Mention Token for a user via Power Automate. This may work for retrieving the ID and Name values for a bot.

Once you have that, you could try mentioning the bot as you would another user.

@atc0005
Copy link
Owner

atc0005 commented Jul 25, 2022

This guide provides the steps necessary to retrieve the ID and display name for a tag:

It may be that retrieving the ID and display name for a bot is similar (haven't tested).

@atc0005 atc0005 added the card format/adaptivecard Adaptive Card support label Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
card format/adaptivecard Adaptive Card support help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants