Set sender address when inviting users via graph API

Matthias Wille 45 Reputation points
2023-05-11T23:25:31.9933333+00:00

I set up a Graph API call from within Salesforce to invite guest users to the Azure Directory. It all works fine, aside from one little thing:

The Graph API sends the invite with my email address (system admin). I would like to use a generic account (like ******@company.com or ******@company.com). The Graph API seems to have no means to provide a sender address. Do I need to create a generic API user with such an email address and select this user as the Owner of the registered app in Azure?

If I do so, will I be able as a Global Administrator to still manage the App Registration entry?

Microsoft Security Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Victor Ivanidze 101 Reputation points
    2023-05-16T14:46:45.3033333+00:00

    As far as I know GRAPH API allows you to set the sender address and the from address - see https://learn.microsoft.com/en-us/graph/api/resources/message?view=graph-rest-1.0

    To send as a shared mailbox you can use something like this:

    POST https://graph.microsoft.com/v1.0/users/******@contoso.com/sendMail

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.