How to create a Terms of Use message
Finally managed to finish my Terms of Use adaptive card example. This was a great way of testing mentioning in adaptive cards and the new When a new team member is added trigger in Power Automate.
Terms of Use
In this example I will post a terms of use message to a Microsoft Teams channel whenever a new user gets added to the related Microsoft Team. The message is an adaptive card with an agree button and new user is also mentioned on the card. When the user agrees the flow is completed.
When the user is added to the team
After the user accepts the terms of use
The setup
1. First I created a new instant flow with the new Microsoft Teams When a new team member is added trigger. This trigger is still in preview btw.
2. The next action is Azure Active Directory Get User action. I am using the User Id from the trigger as a dynamic value for this action.
3. After that I have added the Microsoft Teams Post an Adaptive Card to a Teams channel and wait for a response action. This one is also in preview. I have selected the same Microsoft Team as in the trigger. But I am using a different channel for the message. I have configured the card to be updated and added a thank you message for the update message field.
4. Configure the Terms of Use card via the Adaptive card editor. I have added my example json to this blog.
The challenges
1. I see that the flow gets triggered about every 15 minutes. This might be either an issue or a limitation of the new Microsoft Teams When a new team member is added preview trigger.
2. When you want to mention a user in an adaptive card you have to concat 8:orgid: and the user id to get the correct user reference
3. I added a mention entity in the msteams section and a mention text in the body. It looks like this is needed to mention a user on an adaptive card
Useful Resources
The following links were very useful to me for creating this sample:
Great blog about Adaptive Card mentioning by Kenichiro Nakamura
Docs Microsoft – Adaptive Card Candidate Feedback Sample
Power User Forms thread about Adaptive card mentioning
Docs Microsoft – Format cards in Teams
This looks very promising, thanks for sharing.