ImpersonationType Parameter (Connect-Exchange Cmdlet)
Specifies the type of identifier used for provider impersonation.
Syntax
Connect-Exchange -ImpersonationType string
Possible Values
PrincipalName, SID, PrimarySmtpAddress, SmtpAddressData Type
cstr
Default Value
"PrincipalName"
Remarks
Set this property to control which identifier type is used when impersonating a user account in Exchange Web Services (EWS). This allows you to access mailbox data on behalf of another user.
You can also use the ImpersonationType pseudo-column in SQL queries to dynamically change the impersonation context at runtime.
Available values:
| PrincipalName | Uses the user principal name (UPN) of the account to impersonate. This is typically formatted like an email address ([email protected]). |
| SID | Uses the security identifier (SID) of the account, expressed in SDDL format. This is a fixed identifier assigned by Active Directory. |
| PrimarySmtpAddress | Uses the user's primary SMTP address. Requires an Active Directory lookup to resolve the SID. |
| SmtpAddress | Uses any SMTP address associated with the user. Also requires an Active Directory lookup to resolve the SID. |
This property is useful when accessing mailboxes programmatically on behalf of users, such as in service-based or multi-tenant environments.