[Outlook][Actions] Calls to Microsoft Graph API not working
See original GitHub issuePlatform
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
- 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"
}
- Click button “Send” (top right corner)
- 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)
- Click the button
CURRENT BEHAVIOR
I get this error:
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.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s the response from the onboardoam@microsoft.com :
So Microsoft Graph API si not compatible with Microsoft OAM.
Could you please send an email to the Outlook Actionable Message support address at onboardoam@microsoft.com? They do not monitor this repository.