4

We use the Outlook REST API with Azure AD authentication to access mailboxes of our users. The documentation recommends the use of the x-AnchorMailbox header to optimize performance :

For optimal performance when using the new Outlook REST endpoint, add an x-AnchorMailbox header for every request and set it to the user's email address. For example: x-AnchorMailbox:john@contoso.com

For a given user, should we use the primary SMTP Address (which may change) or the UPN Name for this purpose ?

There are various code samples using these techniques (like this), however it uses an EmailAddress, which can be ambiguous.

Gabriel Boya
  • 761
  • 8
  • 17

1 Answers1

2

You should be setting this to the EmailAddress property of the user (obtained from the /Me endpoint of the API.

Jason Johnston
  • 17,194
  • 2
  • 20
  • 34