The impersonation principal name is invalid on Exchange 2013

Hi,

I have some code for accessing a mailbox of several users using an impersonation account with the role ApplicationImpersonation. This code works against my Exchange 2010 server. But when I run the same code against my 2013 Exchange server I get the error "The impersonation Principal is invalid" Account is configured on both servers with

New-ManagementRoleAssignment Name:impersonationAssignmentName Role:ApplicationImpersonation User:serviceAccount

Any ideas?

Regards

Danny

August 27th, 2015 3:26am

I use this code:

exchangeService.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.PrincipalName, "danny");

this gives me the error "The Impersonation Principal name is invalid". When I change the code to

exchangeService.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, "danny#exchangedev.local");

It works. I used this code against Exchange 2010 and there the first line with ConnectingIdType.PrincipalName works and it doesn't work on Exchange 2013. Any ideas?

Regards

Danny

Free Windows Admin Tool Kit Click here and download it now
September 1st, 2015 3:24am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics