22 lines
566 B
Markdown
22 lines
566 B
Markdown
---
|
|
tags:
|
|
- PowerShell
|
|
- Email
|
|
- Scripting
|
|
---
|
|
|
|
!!! info "Prerequesite: [Connect to Azure AD](./connect-to-azure-ad.md)"
|
|
|
|
The uppercase `SMTP` address is the primary address, while lowercase `smtp` are aliases. You can find the value in active directory in **"User > Attribute Editor > proxyAddresses"**.
|
|
``` powershell
|
|
Get-AzureADUser -ObjectId "user@domain.com" | Select -Property ProxyAddresses
|
|
```
|
|
|
|
!!! example "Example Output"
|
|
``` powershell
|
|
smtp:alias@domain.com
|
|
smtp:alias@domain.onmicrosoft.com
|
|
SMTP:primaryaddress@domain.com
|
|
```
|
|
|