Exchange ImpersonatedUserId error on another MailBox

Thomas GUERIN 0 Reputation points
2023-05-31T07:59:41.0133333+00:00
A user B has a mailbox on which the administrator has given full read/write rights to user A
User A logs into outlook and adds mailbox B. Our outlook addin manages client side to consult emails from mailbox B, however we have a server side backend that uses EWS to get the full content of the message (HTML and parts attached).
This code works on the messages of box A but not on those of box B with the error below

We connect with the token obtained on the client side, we tested with the refreshed token when it is on box A but also while being on box B (with user A of course):


And we have a exception : 


ExchangeImpersonation SOAP header must not exist for this type of Oauth token



Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,690 questions
0 comments No comments
{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.