question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Outlook][Actions] Calls to Microsoft Graph API not working

See original GitHub issue

Platform

What platform is your issue or question related to? (Delete other platforms).

  • Outlook Online and Outlook Desktop

Author or host

Author

If you’re an author, who are you sending cards to? Myself

Version of SDK

Not using SDK. I’m using the Actionable Message Designer.

Details

STEPS TO REPRODUCE

  1. Copy this JSON Payload in the Actionable Message Designer (make sure to replace [INSERT-PERSONAL-EMAIL-HERE] and [INSERT-BEARER-HERE] tags):
{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
        {
            "type": "ActionSet",
            "id": "54c64d02-0b5a-6308-4e06-a8b5a0a04c63",
            "actions": [
                {
                    "type": "Action.Http",
                    "id": "d8b86e97-4921-94fe-5f0f-2f9994a0007a",
                    "title": "Send Email to Myself",
                    "url": "https://graph.microsoft.com/v1.0/me/sendMail",
                    "method": "POST",
                    "style": "positive",
                    "isPrimary": true,
                    "body": "{ \"message\": { \"subject\": \"Meet for lunch?\", \"body\": { \"contentType\": \"Text\", \"content\": \"The new cafeteria is open.\" }, \"toRecipients\": [{ \"emailAddress\": { \"address\": \"[INSERT-PERSONAL-EMAIL-HERE]\" } }] }, \"saveToSentItems\": \"false\" }",
                    "headers": [
                        {
                            "name": "Authorization",
                            "value": "Bearer [INSERT-BEARER-HERE]"
                        },
                        {
                            "name": "Content-Type",
                            "value": "application/json"
                        }
                    ]
                }
            ]
        }
    ],
    "padding": "None",
    "@type": "AdaptiveCard",
    "@context": "http://schema.org/extensions"
}
  1. Click button “Send” (top right corner)
  2. Navigate to your Outlook Online or Outlook Desktop and display the message (you should see an Adaptive Card with a “Send Email to Myself” button)
  3. Click the button

CURRENT BEHAVIOR

I get this error: image

EXPECTED BEHAVIOR

An email with subject “Meet for lunch?” should be sent to my personal email

IT’S NOT THE BEARER

Using the exact same Bearer <ACCESS-TOKEN> in Postman, I’m able to send the email. image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ms-jptoupincommented, Apr 27, 2021

Here’s the response from the onboardoam@microsoft.com :

Subject: Re: [EXTERNAL] [Outlook][Actions] Calls to Microsoft Graph API not working

Hi Jean,

When you execute action.http action, client will send a post request to our internal service which does the communication with the your service i.e url provided in the action.execute payload. 

The internal service expects a valid response which contains adaptive card payload. This response is relayed back to the client to render the refresh card.

Since your service, the graph api, is not a returning a valid response to the internal service, response to the client will be an error with 40* code.  Hence it displays error toast message.

If you have further questions, please reply back.

So Microsoft Graph API si not compatible with Microsoft OAM.

1reaction
dclauxcommented, Apr 23, 2021

Could you please send an email to the Outlook Actionable Message support address at onboardoam@microsoft.com? They do not monitor this repository.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve Microsoft Graph authorization errors
Verify that you have requested the correct set of permissions based on the Microsoft Graph APIs your app calls.
Read more >
Graph API call fails when trying to get message using ...
I have developed an outlook add-in. Following I have provided two Graph API calls that I have performed to get the content of...
Read more >
MS Graph - Power Automate HTTP call not working...
The PowerShell code works for calling MS Graph. However, the "structure" does not seem to be OK for the HTTP widget in Power...
Read more >
Graph API not recognizing user - Microsoft Q&A
I have been trying to access my inbox via the Graph API, I have registered ... The only part I get issues with...
Read more >
Microsoft Graph Known Issues
Microsoft Graph currently returns a 400 Bad Request error code on the v1.0 ... Delta calls to the messages API using immutable Ids....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found