An Outlook event organizer's email is not always the user principal name

Jean-Sébastien Arès 0 Reputation points
2024-12-16T19:02:51.5033333+00:00

Using Graph API, we fetch a certain Outlook event. The event includes, among other details, the organizer information in the following format:

"organizer": {
  "emailAddress": {
    "address": "myroom@email.com",
    "name": "myroom"
  }
}

When we attempt to retrieve more information about this user using the Graph API endpoint /users/{id | userPrincipalName}, we sometimes encounter a response indicating that the user does not exist.

Upon investigation in Exchange Online (Office 365) settings, we discovered that some users have aliases or secondary/alternative SMTP email addresses configured, and those secondary addresses are being included in the organizer's emailAddress object in the Graph API response. This means the address field in the event data may refer to one of these secondary addresses rather than the user's primary email or User Principal Name (UPN).

Question:

Is there a way to retrieve the user's information using the /users Graph API endpoint without relying solely on the User Principal Name? Alternatively, is there a method to determine the user's User Principal Name or Object ID using their secondary email addresses?

Constraints: We cannot modify Exchange Online settings because they are managed by our clients.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,643 questions
Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
5,355 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 111K Reputation points MVP
    2024-12-17T07:24:51.1766667+00:00

    No. The Graph API has limited support for email (Exchange) operations, and there are some recipient types that you will not be able to see at all via the Graph. Moreover, the organizer of an event is not necessarily a user, you can have groups as organizer, not to mention people from external organizations. Do not make the assumption that you will be able to "resolve" the email address to an (user) object within your tenant, this is not always the case.


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.