Implementation for X-AnchorMailBox (Http Header)

Kumar, Sachitha (Legal) 20 Reputation points
2023-07-31T08:58:46.9333333+00:00

Hi All,

Our product has an issue supporting Multi-geo locations .

Current Behaviour is administrator account , Impersonate User account and delegated account should be in same geo location.

We are implementing X-AnchorMailBox to support Multi -geo locations.

We are using One Administartor mailbox, User and Delegated mailbox are of same tenant, not using group Information.

Can anyone please let me know if my changes are correct.

// Configure the ExchangeService with the access token           
  var service = new ExchangeService(ExchangeVersion.Exchange2007_SP1, timeZone);                     
 service.Url = new Uri(" https://outlook.office365.com/EWS/Exchange.asmx");
 service.Credentials = new OAuthCredentials(Token);                     
 service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, mailBox);  
//Implementation of X-Anchor MailBox
 if (!service.HttpHeaders.ContainsKey("X-AnchorMailbox"))  

 service.HttpHeaders.Add("X-AnchorMailbox", mailBox);   
  
else               
 service.HttpHeaders["X-AnchorMailbox"] = mailBox;
Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,668 questions
Microsoft Exchange Online
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,808 questions
Exchange Server Development
Exchange Server Development
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Development: The process of researching, productizing, and refining new or existing technologies.
539 questions
{count} votes

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.