Generate Originator for Outlook Actionable Message Adaptive Card

Recently, I was working on a Power Automate flow to notify users. We generally use an HTML template to send the notification. This time, I thought to implementing something different and tried to create an Adaptive card to send notifications. You can generate a sample adaptive card using the below site.

It is JSON code that will be rendered in a way that is designed by Microsoft apps (like Teams, Outlook, etc.).

Note. This will not work with other cloud emails like Gmail.

Issue

When I tried it for my user, it worked well. But when I sent the email to a colleague to see how it renders on their end, it was not showing. The Emails are showcasing blank cards. The same code was working for teams. It was rendered correctly.

Analysis

When I searched for the issue on the web, I found out that when we use an adaptive card with Outlook, it requires a special header called Originator. This header is not required in the Teams message. So, now the question was how to generate Originator.

Solution

We need to follow the steps below to generate Originator.

  1. Go to the below URL: https://outlook.office.com/connectors/oam/publish
  2. Click New Provider.
    New Provider
  3. This will open a form to fill in details.

New Provider

  • Friendly Name: Provide a name for your connection.
  • Provider ID (Originator): Copy this ID. We will need this to send the Outlook adaptive card.
  • Sender Email Address: Provide the email address from which the adaptive card will be sent.
  • Target URLs: Provide the URL where the response will be received. Please set up using Power Automate or any API that will process the response.
  • Public Key (Optional): Provide RSA key for encryption.
  • Logo (Optional): Provide a logo for your card request.
    Card request

Scope of Submission

This has three different values, and based on selection, there will be additional information will be asked.

  • Test Users: Select this if you are testing the functionality and want to send the card for review to specific users. Once selected, you will see the textbox below to provide the test user email address with “;” (semicolon) separated.
  • This is auto-approved.
    Test Users
  • Organization: If your card is ready and you want to publish this functionality for your organization, select this option. Once selected, you will need to provide an additional email who will be notified and comment why you are setting this up.
  • This will send the notification to your exchange admin for approval, and after approval, it will take approx. 24 hours to roll out the changes.
  • Outlook admin can approve the request on the below link: https://outlook.office.com/connectors/oam/admin.
  • We will set up this in this blog.
    Organization
  • Global: If you want the functionality to be deployed over multiple tenants or want to make it publicly available, please select this option. Once selected, you need to provide your contact information, your company details, the scenario for your adaptive card, your adaptive card code, and screenshots of your cards and their options.
  • This will be sent to Microsoft for approval, and it will take approx. 2 weeks for rollout after Microsoft approves your request.
  • Accept the terms and conditions.
  • Click save.

As mentioned earlier, we are setting up this for the organization. So, I have selected the second option and saved the changes. It then submits the request on the page and you will see the pending request status.

Accept the terms

Now, we need to ask the exchange admin to review the request and approve it.

URL: https://outlook.office.com/connectors/oam/admin

  1. When you open this, you can see all the pending approvals.
    Approvals
  2. Click on Provider.
  3. It will open the submitted request with the approve & reject button.
    Reject button
  4. Click approve and provide any additional comments if needed.
    Additional comments
  5. After this, you can use the Provider ID (Originator) that we have copied in step 3 while creating the Provider.

In the next blog, we will see how to send the adaptive card with Outlook and Power Automate and where to use the Originator.

Reference

  1. https://learn.microsoft.com/en-us/outlook/actionable-messages/adaptive-card#outlook-specific-adaptive-card-properties-and-features


Similar Articles