Questions tagged [microsoft-graph-mail]

Microsoft Graph Mail refers to the Outlook Mail APIs in Microsoft Graph. This tag should always be used in conjunction with the [microsoft-graph] tag.

484 questions
1
vote
1 answer

Microsoft Graph OrganizationFromTenantGuidNotFound when using mail.send

I would like to use Microsoft Graph and this works: await graphClient.Users["xxxxxxx-xxxx-xxx-xxxx-xxxxxxx"] .Request() .GetAsync(); And this throws the OrganizationFromTenantGuidNotFound error: await…
Dennis Vrm
  • 13
  • 3
1
vote
1 answer

How to actually configure Microsoft Graph API for Mail

I'm trying to work with the MS Graph APIs for the first time. What I want to do is simple in words- I want to create a daemon app which will keep checking for unread mails in a outlook / microsoft mailbox, if found it pulls the mail and processes…
Kris
  • 8,680
  • 4
  • 39
  • 67
1
vote
1 answer

Moving emails/messages using Microsoft Graph SDK's Batch Requests

My objective is to process emails in a folder and then move them to another folder to which I have the id. To ease the workload I'm trying to make use of the batch functionality. Unfortunately, every time I try to run the batch function I'm…
1
vote
1 answer

Get preferred_username with microsoft graph API

I'm trying to get the preferred username of a user via the Graph API for Microsoft Office / Azure If a user logs in via an enterprise application with an id_token I get the preferred_username claim. This has the user's actual email address. If I try…
1
vote
0 answers

Microsoft Graph : How get alias email from message

When a message has sent to an alias email, MS Graph return always principal email in "toRecipients" or in the internet message headers. I tried…
Seb
  • 11
  • 1
1
vote
1 answer

"mail" field doesn't have unique values in Graph API

We have encountered an issue where we can't always reliably discern users by their e-mail address, i.e. several users may have the same exact address. This breaks the logic in our software which relies on the addressess being unique, and we have…
1
vote
2 answers

create mailbox along with Create users graph api in o365

We have a requirement to create office 365 user with mail account through create_user graph api. But user has been created successfully but mail account did not created. Let us know api name to create user with mail account directly through api.
1
vote
0 answers

How to find total count of emails (Read/Unread) within a specific date range using Microsoft Graph Mail API?

I have a scenario where I want to find out the total number of emails within a specific date range. I am currently using the List Messages API (GET /users/{id | userPrincipalName}/messages) and tried specifying the $count=true parameter but it is…
Marry35
  • 387
  • 4
  • 16
1
vote
1 answer

Importance of 'supported account type' when registering an app with application permission

I build a web app which send mails (with Microsoft Graph) but not on behalf of users. Rather think of a 'do-not-reply email' sent to users with some info. The application should have "Mail.Send" application permission on Microsoft Graph. The mail…
Bronzato
  • 9,438
  • 29
  • 120
  • 212
1
vote
0 answers

Microsoft.Graph.ServiceException Code: MailboxNotEnabledForRESTAPI

Can successfully get user's emails by using Graph Explorer or DeviceCodeProvider. DeviceCodeProvider IPublicClientApplication publicClientApplication = PublicClientApplicationBuilder .Create(clientId) .Build(); …
1
vote
1 answer

How can i use a template in the email body for Microsoft graph API?

I am looking to use the source code of an email which has the desired template that i need in the Microsoft Graph API. The standard format for this looks like so: "message": { "subject": "Meet for lunch?", "body": { …
1
vote
2 answers

Microsoft Graph API "Access is denied" while trying to read the ItemAttachment Properties with $expand(microsoft.graph.itemattachment/item)

I am trying to retrieve the properties of an ItemAttachment, which is of message type. I have given all the required permissions and able to receive the ItemAttachment properties. But when I use $expand to get further properties of the…
1
vote
0 answers

Why MS Graph is truncating the JSON response?

I'm processing M365 mailbox messages via MS Graph. I'm using .Net5 and the latest version of MSGraph SDK for .NET; (particularly the PageIterator for processing email messages) - but i'm actually experiencing the issue even via a pure call via…
1
vote
1 answer

Microsoft graph API to send Email using token authentication using client secret . I have pasted token in https://jwt.ms/ but missing scope

I am using Graph API to send emails and using clientID, Secret and APPID. I'm getting the token, but I'm unable to send emails: Code: NoPermissionsInAccessToken Message: The token contains no permissions, or permissions can not be understood. Inner…
1
vote
0 answers

MS Graph API search and count not working together

I am searching inbox messages using MS Graph API. Here is the request https://graph.microsoft.com/v1.0/me/mailFolders/inbox/messages?$search="attachment:blabla"&$count=true I have also set the header to "ConsistencyLevel”: “eventual” After executing…