mailUsers
Mail Users. Mail-enabled accounts with an external address but no mailbox. The mailUsers entity set lives under /exchange/v1.0/mailUsers in the Recipients category.
| Fact | Value |
|---|---|
| Path | /exchange/v1.0/mailUsers |
| Category | Recipients |
| Tier | Tier 0, Directory |
| Read role | Recipient.Read.All (Community) |
| Write role | Recipient.ReadWrite.All (Pro) |
| Backing cmdlets | Get-MailUser, Set-MailUser, New-MailUser, Remove-MailUser |
Routes
Section titled “Routes”| Method | Path | Synopsis | Role | Plan |
|---|---|---|---|---|
| GET | /exchange/v1.0/mailUsers |
List mailUsers entries. | Recipient.Read |
Community |
| POST | /exchange/v1.0/mailUsers |
POST /mailUsers - creates a mail-enabled user via New-MailUser. One of externalEmailAddress / microsoftOnlineServicesID + password / federatedIdentity must be present (cmdlet enforces the parameter-set mutex). password is plain-text in the body, converted to SecureString server-side per the slice-6 pattern. Returns 201 + Location. | Recipient.ReadWrite |
Pro |
| GET | /exchange/v1.0/mailUsers/{key} |
Get a single mailUsers entry by Identity. | Recipient.Read |
Community |
| PATCH | /exchange/v1.0/mailUsers/{key} |
PATCH /mailUsers/{key} - partial update via Set-MailUser. Returns 200 + updated entity. | Recipient.ReadWrite |
Pro |
| DELETE | /exchange/v1.0/mailUsers/{key} |
DELETE /mailUsers/{key} - destructive. Use ?permanentlyDelete=true to skip the recoverable-items window. | Recipient.ReadWrite |
Pro |
GET /exchange/v1.0/mailUsers
Section titled “GET /exchange/v1.0/mailUsers”List mailUsers entries.
Backing cmdlet: Get-MailUser. Role: Recipient.Read (Community).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
softDeletedMailUser |
query | bool (switch) | Include soft-deleted (still-recoverable) mail users in the results (EXO-only, maps -SoftDeletedMailUser). | |
sharedWithMailUser |
query | bool (switch) | List shared mail users in the results (EXO-only, maps -SharedWithMailUser). | |
all |
query | bool (switch) | Return all results instead of the EXO default of 1000. Maps -ResultSize Unlimited on Get-MailUser; prevents silent truncation in large tenants. | |
anr |
query | string | Ambiguous name resolution: match mail users by partial name, display name, or alias. Maps -Anr on Get-MailUser. | |
hVEAccount |
query | bool (switch) | Return only high-volume email (HVE) accounts in the results. Maps -HVEAccount on Get-MailUser. |
List mailUsers
Section titled “List mailUsers”Returns the first three mail users in the organization. Backed by the Get-MailUser cmdlet; each entry is the full MailUser entity including guest and cloud mail-user variants.
GET /exchange/v1.0/mailUsers?$top=3 HTTP/1.1Authorization: Bearer {token}HTTP/1.1 200 OK
{ "@odata.context": "http://localhost:5043/exchange/v1.0/$metadata#mailUsers", "value": [ { "Id": "19ace2d2-ceaf-4ddf-a6c9-08ddb9eab4a4", "ExchangeGuid": "00000000-0000-0000-0000-000000000000", "Guid": "23078dde-6e0e-40a0-a9f7-779c3299b9a2", "DisplayName": "Carter, Sam", "SimpleDisplayName": "", "PhoneticDisplayName": null, "Name": "19ace2d2-ceaf-4ddf-a6c9-08ddb9eab4a4", "Alias": "sam.carter_contoso.com#EXT#", "DistinguishedName": "CN=19ace2d2-ceaf-4ddf-a6c9-08ddb9eab4a4,OU=contoso.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,DC=EURPR01A017,DC=PROD,DC=OUTLOOK,DC=COM", "Identity": "19ace2d2-ceaf-4ddf-a6c9-08ddb9eab4a4", "ExternalDirectoryObjectId": "19ace2d2-ceaf-4ddf-a6c9-08ddb9eab4a4", "PrimarySmtpAddress": "sam.carter@contoso.com", "WindowsLiveID": "sam.carter_contoso.com#EXT#@contoso.onmicrosoft.com", "WindowsEmailAddress": "", "EmailAddresses": [ "SMTP:sam.carter@contoso.com" ], "EmailAddressPolicyEnabled": false, "RecipientType": "MailUser", "RecipientTypeDetails": "GuestMailUser", "OrganizationalUnit": "eurpr01a017.prod.outlook.com/Microsoft Exchange Hosted Organizations/contoso.onmicrosoft.com", "OrganizationId": "EURPR01A017.PROD.OUTLOOK.COM/Microsoft Exchange Hosted Organizations/contoso.onmicrosoft.com - EURPR01A017.PROD.OUTLOOK.COM/ConfigurationUnits/contoso.onmicrosoft.com/Configuration", "CustomAttribute1": "", "CustomAttribute2": "", "CustomAttribute3": "", "CustomAttribute4": "", "CustomAttribute5": "", "ExtensionCustomAttribute1": [], "ExtensionCustomAttribute2": [], "ExtensionCustomAttribute3": [], "ExtensionCustomAttribute4": [], "ExtensionCustomAttribute5": [], "HiddenFromAddressListsEnabled": true, "AddressBookPolicy": null, "WhenCreated": "2026-05-15T22:55:35+03:00", "WhenChanged": "2026-05-15T23:43:13+03:00", "WhenCreatedUTC": "2026-05-15T19:55:35Z", "WhenChangedUTC": "2026-05-15T20:43:13Z", "ExternalEmailAddress": "SMTP:sam.carter@contoso.com", "UserPrincipalName": "sam.carter_contoso.com#EXT#@contoso.onmicrosoft.com", "FirstName": null, "LastName": null, "Title": null, "Department": null, "Company": null, "Office": null, "Phone": null, "MobilePhone": null, "Manager": null, "City": null, "StateOrProvince": null, "PostalCode": null, "CountryOrRegion": null, "AccountDisabled": false, "ExternalDirectoryObjectIdSet": false, "SamAccountName": "$JMVGI0-ND6TQ7JPC5HT", "AcceptMessagesOnlyFrom": [], "AcceptMessagesOnlyFromDLMembers": [], "AcceptMessagesOnlyFromSendersOrMembers": [], "AddressListMembership": [ "\\All Mail Users(VLV)", "\\All Recipients(VLV)" ], "AdministrativeUnits": [], "AgentIdentityBlueprintId": "", "AggregatedMailboxGuids": [], "ArbitrationMailbox": null, "ArchiveDatabase": null, "ArchiveGuid": "00000000-0000-0000-0000-000000000000", "ArchiveName": [], "ArchiveQuota": "100 GB (107,374,182,400 bytes)", "ArchiveRelease": "", "ArchiveStatus": "None", "ArchiveWarningQuota": "90 GB (96,636,764,160 bytes)", "BulkMailEnabled": false, "BypassModerationFromSendersOrMembers": [], "CalendarVersionStoreDisabled": false, "ComplianceTagHoldApplied": false, "CustomAttribute10": "", "CustomAttribute11": "", "CustomAttribute12": "", "CustomAttribute13": "", "CustomAttribute14": "", "CustomAttribute15": "", "CustomAttribute6": "", "CustomAttribute7": "", "CustomAttribute8": "", "CustomAttribute9": "", "DataEncryptionPolicy": null, "DelayHoldApplied": false, "DelayReleaseHoldApplied": false, "DeliverToMailboxAndForward": false, "DisabledArchiveDatabase": null, "DisabledArchiveGuid": "00000000-0000-0000-0000-000000000000", "EndDateForRetentionHold": null, "ExchangeObjectId": "05aeb349-a264-492c-90cc-213efeaec4a0", "ForwardingAddress": null, "GrantSendOnBehalfTo": [], "GuestHint": null, "GuestInfo": null, "HasPicture": false, "HasSpokenName": false, "ImmutableId": "", "InactiveMailboxRetireTime": null, "IsAgenticUser": false, "IsDirSynced": false, "IsInactiveMailbox": false, "IsMonitoringMailbox": false, "IsSoftDeletedByDisable": false, "IsSoftDeletedByRemove": false, "IssueWarningQuota": "98 GB (105,226,698,752 bytes)", "JoinedSmtpAddress": "", "JournalArchiveAddress": "", "LastExchangeChangedTime": null, "LegacyExchangeDN": "/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=c72fefb7b5254d28864ce50da237c9c2-19ace2d2-ce", "LitigationHoldDate": null, "LitigationHoldEnabled": false, "LitigationHoldOwner": "", "MacAttachmentFormat": "BinHex", "MailTip": null, "MailTipTranslations": [], "MailboxContainerGuid": null, "MailboxLocations": [ "1;7f26dee3-229d-48c8-98de-a333621a7cff;ComponentShared;EURPRD02.PROD.OUTLOOK.COM;fb6048e3-a9e3-418b-937c-d621c7c8276a" ], "MailboxMoveBatchName": "", "MailboxMoveFlags": "None", "MailboxMoveRemoteHostName": "", "MailboxMoveSourceMDB": null, "MailboxMoveStatus": "None", "MailboxMoveTargetMDB": null, "MailboxProvisioningConstraint": null, "MailboxProvisioningPreferences": [], "MailboxRegion": null, "MailboxRegionLastUpdateTime": null, "MailboxRegionSuffix": "None", "MailboxRelease": "", "MaxReceiveSize": "Unlimited", "MaxSendSize": "Unlimited", "MessageBodyFormat": "TextAndHtml", "MessageFormat": "Mime", "MicrosoftOnlineServicesID": "sam.carter_contoso.com#EXT#@contoso.onmicrosoft.com", "ModeratedBy": [], "ModerationEnabled": false, "NetID": "10032005E5A35A02", "OrganizationalUnitRoot": "contoso.onmicrosoft.com", "OrphanSoftDeleteTrackingTime": null, "OtherMail": "sam.carter@contoso.com", "PersistedCapabilities": [], "PoliciesExcluded": [ "{26491cfc-9e50-4857-861b-0cb8df22b5d7}" ], "PoliciesIncluded": [], "ProhibitSendQuota": "99 GB (106,300,440,576 bytes)", "ProhibitSendReceiveQuota": "100 GB (107,374,182,400 bytes)", "ProtocolSettings": [ "RemotePowerShell§1" ], "RecipientLimits": "Unlimited", "RecoverableItemsQuota": "30 GB (32,212,254,720 bytes)", "RecoverableItemsWarningQuota": "20 GB (21,474,836,480 bytes)", "RejectMessagesFrom": [], "RejectMessagesFromDLMembers": [], "RejectMessagesFromSendersOrMembers": [], "RequireSenderAuthenticationEnabled": false, "ResetPasswordOnNextLogon": false, "RetainDeletedItemsFor": "14.00:00:00", "RetentionComment": "", "RetentionHoldEnabled": false, "RetentionUrl": "", "SKUAssigned": null, "SendModerationNotifications": "Always", "SharedWithReference": "", "SingleItemRecoveryEnabled": false, "StartDateForRetentionHold": null, "StsRefreshTokensValidFrom": "2026-05-15T22:55:17+03:00", "UMDtmfMap": [], "UsageLocation": null, "UseMapiRichTextFormat": "Never", "UsePreferMessageFormat": false, "UserCertificate": [], "UserIdentityParent": "", "UserSMimeCertificate": [], "WasInactiveMailbox": false, "WhenMailboxCreated": null, "WhenSoftDeleted": null, "ExchangeUserAccountControl": "NormalAccount", "InPlaceHolds": [] }, { "Id": "7ff1b46c-a344-468c-86b8-7babac43d16b", "ExchangeGuid": "00000000-0000-0000-0000-000000000000", "Guid": "b78f5310-a5c4-4259-b03f-88bd44b6df61", "DisplayName": "Lee, Dana", "SimpleDisplayName": "", "PhoneticDisplayName": null, "Name": "7ff1b46c-a344-468c-86b8-7babac43d16b", "Alias": "dana.lee_contoso.com#EXT#", "DistinguishedName": "CN=7ff1b46c-a344-468c-86b8-7babac43d16b,OU=contoso.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,DC=EURPR01A017,DC=PROD,DC=OUTLOOK,DC=COM", "Identity": "7ff1b46c-a344-468c-86b8-7babac43d16b", "ExternalDirectoryObjectId": "7ff1b46c-a344-468c-86b8-7babac43d16b", "PrimarySmtpAddress": "dana.lee@contoso.com", "WindowsLiveID": "dana.lee_contoso.com#EXT#@contoso.onmicrosoft.com", "WindowsEmailAddress": "", "EmailAddresses": [ "SMTP:dana.lee@contoso.com" ], "EmailAddressPolicyEnabled": false, "RecipientType": "MailUser", "RecipientTypeDetails": "GuestMailUser", "OrganizationalUnit": "eurpr01a017.prod.outlook.com/Microsoft Exchange Hosted Organizations/contoso.onmicrosoft.com", "OrganizationId": "EURPR01A017.PROD.OUTLOOK.COM/Microsoft Exchange Hosted Organizations/contoso.onmicrosoft.com - EURPR01A017.PROD.OUTLOOK.COM/ConfigurationUnits/contoso.onmicrosoft.com/Configuration", "CustomAttribute1": "", "CustomAttribute2": "", "CustomAttribute3": "", "CustomAttribute4": "", "CustomAttribute5": "", "ExtensionCustomAttribute1": [], "ExtensionCustomAttribute2": [], "ExtensionCustomAttribute3": [], "ExtensionCustomAttribute4": [], "ExtensionCustomAttribute5": [], "HiddenFromAddressListsEnabled": true, "AddressBookPolicy": null, "WhenCreated": "2026-03-31T17:41:03+03:00", "WhenChanged": "2026-05-29T07:33:07+03:00", "WhenCreatedUTC": "2026-03-31T14:41:03Z", "WhenChangedUTC": "2026-05-29T04:33:07Z", "ExternalEmailAddress": "SMTP:dana.lee@contoso.com", "UserPrincipalName": "dana.lee_contoso.com#EXT#@contoso.onmicrosoft.com", "FirstName": null, "LastName": null, "Title": null, "Department": null, "Company": null, "Office": null, "Phone": null, "MobilePhone": null, "Manager": null, "City": null, "StateOrProvince": null, "PostalCode": null, "CountryOrRegion": null, "AccountDisabled": false, "ExternalDirectoryObjectIdSet": false, "SamAccountName": "$2QUJH0-79D83LH534U7", "AcceptMessagesOnlyFrom": [], "AcceptMessagesOnlyFromDLMembers": [], "AcceptMessagesOnlyFromSendersOrMembers": [], "AddressListMembership": [ "\\All Recipients(VLV)", "\\All Mail Users(VLV)" ], "AdministrativeUnits": [], "AgentIdentityBlueprintId": "", "AggregatedMailboxGuids": [], "ArbitrationMailbox": null, "ArchiveDatabase": null, "ArchiveGuid": "00000000-0000-0000-0000-000000000000", "ArchiveName": [], "ArchiveQuota": "100 GB (107,374,182,400 bytes)", "ArchiveRelease": "", "ArchiveStatus": "None", "ArchiveWarningQuota": "90 GB (96,636,764,160 bytes)", "BulkMailEnabled": false, "BypassModerationFromSendersOrMembers": [], "CalendarVersionStoreDisabled": false, "ComplianceTagHoldApplied": false, "CustomAttribute10": "", "CustomAttribute11": "", "CustomAttribute12": "", "CustomAttribute13": "", "CustomAttribute14": "", "CustomAttribute15": "", "CustomAttribute6": "", "CustomAttribute7": "", "CustomAttribute8": "", "CustomAttribute9": "", "DataEncryptionPolicy": null, "DelayHoldApplied": false, "DelayReleaseHoldApplied": false, "DeliverToMailboxAndForward": false, "DisabledArchiveDatabase": null, "DisabledArchiveGuid": "00000000-0000-0000-0000-000000000000", "EndDateForRetentionHold": null, "ExchangeObjectId": "f8f7082b-f8ff-43e7-b992-f1edde58bc12", "ForwardingAddress": null, "GrantSendOnBehalfTo": [], "GuestHint": null, "GuestInfo": null, "HasPicture": false, "HasSpokenName": false, "ImmutableId": "", "InactiveMailboxRetireTime": null, "IsAgenticUser": false, "IsDirSynced": false, "IsInactiveMailbox": false, "IsMonitoringMailbox": false, "IsSoftDeletedByDisable": false, "IsSoftDeletedByRemove": false, "IssueWarningQuota": "98 GB (105,226,698,752 bytes)", "JoinedSmtpAddress": "", "JournalArchiveAddress": "", "LastExchangeChangedTime": null, "LegacyExchangeDN": "/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=b70cf7fc96c644b38b3b99857145e693-7ff1b46c-a3", "LitigationHoldDate": null, "LitigationHoldEnabled": false, "LitigationHoldOwner": "", "MacAttachmentFormat": "BinHex", "MailTip": null, "MailTipTranslations": [], "MailboxContainerGuid": null, "MailboxLocations": [ "1;ba6fdb99-20e9-4083-bcf9-bd23d2c3821f;ComponentShared;eurprd02.prod.outlook.com;e362720a-264d-4472-8f6b-ccc785dbfa63" ], "MailboxMoveBatchName": "", "MailboxMoveFlags": "None", "MailboxMoveRemoteHostName": "", "MailboxMoveSourceMDB": null, "MailboxMoveStatus": "None", "MailboxMoveTargetMDB": null, "MailboxProvisioningConstraint": null, "MailboxProvisioningPreferences": [], "MailboxRegion": null, "MailboxRegionLastUpdateTime": null, "MailboxRegionSuffix": "None", "MailboxRelease": "", "MaxReceiveSize": "Unlimited", "MaxSendSize": "Unlimited", "MessageBodyFormat": "TextAndHtml", "MessageFormat": "Mime", "MicrosoftOnlineServicesID": "dana.lee_contoso.com#EXT#@contoso.onmicrosoft.com", "ModeratedBy": [], "ModerationEnabled": false, "NetID": "1003200567831E8A", "OrganizationalUnitRoot": "contoso.onmicrosoft.com", "OrphanSoftDeleteTrackingTime": null, "OtherMail": "dana.lee@contoso.com", "PersistedCapabilities": [], "PoliciesExcluded": [ "{26491cfc-9e50-4857-861b-0cb8df22b5d7}" ], "PoliciesIncluded": [], "ProhibitSendQuota": "99 GB (106,300,440,576 bytes)", "ProhibitSendReceiveQuota": "100 GB (107,374,182,400 bytes)", "ProtocolSettings": [ "RemotePowerShell§1" ], "RecipientLimits": "Unlimited", "RecoverableItemsQuota": "100 GB (107,374,182,400 bytes)", "RecoverableItemsWarningQuota": "90 GB (96,636,764,160 bytes)", "RejectMessagesFrom": [], "RejectMessagesFromDLMembers": [], "RejectMessagesFromSendersOrMembers": [], "RequireSenderAuthenticationEnabled": false, "ResetPasswordOnNextLogon": false, "RetainDeletedItemsFor": "14.00:00:00", "RetentionComment": "", "RetentionHoldEnabled": false, "RetentionUrl": "", "SKUAssigned": null, "SendModerationNotifications": "Always", "SharedWithReference": "", "SingleItemRecoveryEnabled": false, "StartDateForRetentionHold": null, "StsRefreshTokensValidFrom": "2025-12-11T13:00:48+02:00", "UMDtmfMap": [], "UsageLocation": null, "UseMapiRichTextFormat": "Never", "UsePreferMessageFormat": false, "UserCertificate": [], "UserIdentityParent": "", "UserSMimeCertificate": [], "WasInactiveMailbox": false, "WhenMailboxCreated": null, "WhenSoftDeleted": null, "ExchangeUserAccountControl": "NormalAccount", "InPlaceHolds": [] }, { "Id": "90678a00-1c81-4d40-a59d-4ea05d064948", "ExchangeGuid": "00000000-0000-0000-0000-000000000000", "Guid": "0c1abe7a-cb34-4b5f-86b2-933a40f34e18", "DisplayName": "t1", "SimpleDisplayName": "", "PhoneticDisplayName": null, "Name": "90678a00-1c81-4d40-a59d-4ea05d064948", "Alias": "ffs", "DistinguishedName": "CN=90678a00-1c81-4d40-a59d-4ea05d064948,OU=contoso.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,DC=EURPR01A017,DC=PROD,DC=OUTLOOK,DC=COM", "Identity": "90678a00-1c81-4d40-a59d-4ea05d064948", "ExternalDirectoryObjectId": "90678a00-1c81-4d40-a59d-4ea05d064948", "PrimarySmtpAddress": "ffs@contoso.onmicrosoft.com", "WindowsLiveID": "ffs@contoso.onmicrosoft.com", "WindowsEmailAddress": "ffs@contoso.onmicrosoft.com", "EmailAddresses": [ "SMTP:ffs@contoso.onmicrosoft.com" ], "EmailAddressPolicyEnabled": false, "RecipientType": "MailUser", "RecipientTypeDetails": "MailUser", "OrganizationalUnit": "eurpr01a017.prod.outlook.com/Microsoft Exchange Hosted Organizations/contoso.onmicrosoft.com", "OrganizationId": "EURPR01A017.PROD.OUTLOOK.COM/Microsoft Exchange Hosted Organizations/contoso.onmicrosoft.com - EURPR01A017.PROD.OUTLOOK.COM/ConfigurationUnits/contoso.onmicrosoft.com/Configuration", "CustomAttribute1": "", "CustomAttribute2": "", "CustomAttribute3": "", "CustomAttribute4": "", "CustomAttribute5": "", "ExtensionCustomAttribute1": [], "ExtensionCustomAttribute2": [], "ExtensionCustomAttribute3": [], "ExtensionCustomAttribute4": [], "ExtensionCustomAttribute5": [], "HiddenFromAddressListsEnabled": true, "AddressBookPolicy": null, "WhenCreated": "2026-03-30T17:10:28+03:00", "WhenChanged": "2026-03-30T17:49:40+03:00", "WhenCreatedUTC": "2026-03-30T14:10:28Z", "WhenChangedUTC": "2026-03-30T14:49:40Z", "ExternalEmailAddress": "SMTP:admin@contoso.onmicrosoft.com", "UserPrincipalName": "ffs@contoso.onmicrosoft.com", "FirstName": null, "LastName": null, "Title": null, "Department": null, "Company": null, "Office": null, "Phone": null, "MobilePhone": null, "Manager": null, "City": null, "StateOrProvince": null, "PostalCode": null, "CountryOrRegion": null, "AccountDisabled": false, "ExternalDirectoryObjectIdSet": false, "SamAccountName": "$I88HG0-R9311HD5EO9K", "AcceptMessagesOnlyFrom": [], "AcceptMessagesOnlyFromDLMembers": [], "AcceptMessagesOnlyFromSendersOrMembers": [], "AddressListMembership": [ "\\All Recipients(VLV)", "\\All Mail Users(VLV)" ], "AdministrativeUnits": [], "AgentIdentityBlueprintId": "", "AggregatedMailboxGuids": [], "ArbitrationMailbox": null, "ArchiveDatabase": null, "ArchiveGuid": "00000000-0000-0000-0000-000000000000", "ArchiveName": [], "ArchiveQuota": "100 GB (107,374,182,400 bytes)", "ArchiveRelease": "", "ArchiveStatus": "None", "ArchiveWarningQuota": "90 GB (96,636,764,160 bytes)", "BulkMailEnabled": false, "BypassModerationFromSendersOrMembers": [], "CalendarVersionStoreDisabled": false, "ComplianceTagHoldApplied": false, "CustomAttribute10": "", "CustomAttribute11": "", "CustomAttribute12": "", "CustomAttribute13": "", "CustomAttribute14": "", "CustomAttribute15": "", "CustomAttribute6": "", "CustomAttribute7": "", "CustomAttribute8": "", "CustomAttribute9": "", "DataEncryptionPolicy": null, "DelayHoldApplied": false, "DelayReleaseHoldApplied": false, "DeliverToMailboxAndForward": false, "DisabledArchiveDatabase": null, "DisabledArchiveGuid": "00000000-0000-0000-0000-000000000000", "EndDateForRetentionHold": null, "ExchangeObjectId": "9b895e64-643d-4786-97de-6e1206e4b47e", "ForwardingAddress": null, "GrantSendOnBehalfTo": [], "GuestHint": null, "GuestInfo": null, "HasPicture": false, "HasSpokenName": false, "ImmutableId": "", "InactiveMailboxRetireTime": null, "IsAgenticUser": false, "IsDirSynced": true, "IsInactiveMailbox": false, "IsMonitoringMailbox": false, "IsSoftDeletedByDisable": false, "IsSoftDeletedByRemove": false, "IssueWarningQuota": "98 GB (105,226,698,752 bytes)", "JoinedSmtpAddress": "", "JournalArchiveAddress": "", "LastExchangeChangedTime": null, "LegacyExchangeDN": "/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=67d37309858a4664acab40cb33b54fff-90678a00-1c", "LitigationHoldDate": null, "LitigationHoldEnabled": false, "LitigationHoldOwner": "", "MacAttachmentFormat": "BinHex", "MailTip": null, "MailTipTranslations": [], "MailboxContainerGuid": null, "MailboxLocations": [ "1;49bb6ff0-fa7d-422f-a782-570196719202;ComponentShared;eurprd02.prod.outlook.com;288a27b4-5ca1-49b6-af4e-308375684f6f" ], "MailboxMoveBatchName": "", "MailboxMoveFlags": "None", "MailboxMoveRemoteHostName": "", "MailboxMoveSourceMDB": null, "MailboxMoveStatus": "None", "MailboxMoveTargetMDB": null, "MailboxProvisioningConstraint": null, "MailboxProvisioningPreferences": [], "MailboxRegion": null, "MailboxRegionLastUpdateTime": null, "MailboxRegionSuffix": "None", "MailboxRelease": "", "MaxReceiveSize": "Unlimited", "MaxSendSize": "Unlimited", "MessageBodyFormat": "TextAndHtml", "MessageFormat": "Mime", "MicrosoftOnlineServicesID": "ffs@contoso.onmicrosoft.com", "ModeratedBy": [], "ModerationEnabled": false, "NetID": "100320044BA52B09", "OrganizationalUnitRoot": "contoso.onmicrosoft.com", "OrphanSoftDeleteTrackingTime": null, "OtherMail": null, "PersistedCapabilities": [], "PoliciesExcluded": [ "{26491cfc-9e50-4857-861b-0cb8df22b5d7}" ], "PoliciesIncluded": [], "ProhibitSendQuota": "99 GB (106,300,440,576 bytes)", "ProhibitSendReceiveQuota": "100 GB (107,374,182,400 bytes)", "ProtocolSettings": [ "RemotePowerShell§1" ], "RecipientLimits": "Unlimited", "RecoverableItemsQuota": "100 GB (107,374,182,400 bytes)", "RecoverableItemsWarningQuota": "90 GB (96,636,764,160 bytes)", "RejectMessagesFrom": [], "RejectMessagesFromDLMembers": [], "RejectMessagesFromSendersOrMembers": [], "RequireSenderAuthenticationEnabled": false, "ResetPasswordOnNextLogon": false, "RetainDeletedItemsFor": "14.00:00:00", "RetentionComment": "", "RetentionHoldEnabled": false, "RetentionUrl": "", "SKUAssigned": null, "SendModerationNotifications": "Always", "SharedWithReference": "", "SingleItemRecoveryEnabled": false, "StartDateForRetentionHold": null, "StsRefreshTokensValidFrom": "2025-02-10T20:06:17+02:00", "UMDtmfMap": [], "UsageLocation": null, "UseMapiRichTextFormat": "UseDefaultSettings", "UsePreferMessageFormat": false, "UserCertificate": [], "UserIdentityParent": "", "UserSMimeCertificate": [], "WasInactiveMailbox": false, "WhenMailboxCreated": null, "WhenSoftDeleted": null, "ExchangeUserAccountControl": "NormalAccount", "InPlaceHolds": [ "UniH8bcbfdfd-77ad-4386-b0d2-72eb55fc0b33" ] } ]}Notes: Mixes GuestMailUser (external invitees, alias ends in #EXT#) and MailUser (cloud mail user) variants. Quota/limit strings are returned formatted by EXO.
Related: GET /exchange/v1.0/mailUsers/{key}
POST /exchange/v1.0/mailUsers
Section titled “POST /exchange/v1.0/mailUsers”POST /mailUsers - creates a mail-enabled user via New-MailUser. One of externalEmailAddress / microsoftOnlineServicesID + password / federatedIdentity must be present (cmdlet enforces the parameter-set mutex). password is plain-text in the body, converted to SecureString server-side per the slice-6 pattern. Returns 201 + Location.
Backing cmdlet: New-MailUser. Role: Recipient.ReadWrite (Pro).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
name |
body | yes | ||
alias |
body | |||
displayName |
body | |||
externalEmailAddress |
body | |||
federatedIdentity |
body | |||
firstName |
body | |||
hveAccount |
body | boolean (switch) | ||
immutableId |
body | |||
initials |
body | |||
lastName |
body | |||
macAttachmentFormat |
body | |||
mailboxRegion |
body | |||
messageBodyFormat |
body | |||
messageFormat |
body | |||
microsoftOnlineServicesID |
body | |||
moderatedBy |
body | |||
moderationEnabled |
body | |||
organizationalUnit |
body | |||
password |
body | |||
primarySmtpAddress |
body | |||
remotePowerShellEnabled |
body | |||
sendModerationNotifications |
body | |||
usePreferMessageFormat |
body | |||
dryRun |
query | bool (switch) |
Create a mail user without the required name (400)
Section titled “Create a mail user without the required name (400)”New-MailUser requires the name field. Omitting it fails body validation before the cmdlet is invoked and returns the canonical 400 envelope.
POST /exchange/v1.0/mailUsers HTTP/1.1Authorization: Bearer {token}Content-Type: application/json
{ "displayName": "Exonaut Sample MailUser", "externalEmailAddress": "exonaut.sample@contoso.com"}HTTP/1.1 400 Bad RequestContent-Type: application/json
{ "error": { "code": "BadRequest", "message": "The 'name' field is required.", "target": "name" }, "correlationId": "0HN7K2Q9F3B1A:00000001"}Notes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.
Related: GET /exchange/v1.0/mailUsers
Create a mail user
Section titled “Create a mail user”Creates a mail-enabled user (no mailbox; mail is delivered to an external address) via New-MailUser. Name is required; supply one identity combo - externalEmailAddress, or microsoftOnlineServicesID + password, or federatedIdentity - and the cmdlet enforces the parameter-set mutex.
POST /exchange/v1.0/mailUsers HTTP/1.1Authorization: Bearer {token}Content-Type: application/json
{ "name": "exonaut-sample-mailUsers", "displayName": "Exonaut Sample MailUser", "alias": "exonaut-sample-mailUsers", "firstName": "Exonaut", "lastName": "Sample", "externalEmailAddress": "exonaut.sample@contoso.com", "primarySmtpAddress": "exonaut-sample-mailUsers@contoso.com"}HTTP/1.1 201 CreatedLocation: /exchange/v1.0/mailUsers/exonaut-sample-mailUsers
{ "Id": "exonaut-sample-mailUsers", "Identity": "exonaut-sample-mailUsers", "Name": "exonaut-sample-mailUsers", "DisplayName": "Exonaut Sample MailUser", "Alias": "exonaut-sample-mailUsers", "ExternalEmailAddress": "SMTP:exonaut.sample@contoso.com", "PrimarySmtpAddress": "exonaut-sample-mailUsers@contoso.com"}Notes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.
Related: GET /exchange/v1.0/mailUsers
GET /exchange/v1.0/mailUsers/{key}
Section titled “GET /exchange/v1.0/mailUsers/{key}”Get a single mailUsers entry by Identity.
Backing cmdlet: Get-MailUser. Role: Recipient.Read (Community).
Get a single mailUsers entry
Section titled “Get a single mailUsers entry”Returns the full MailUser entity for one identity. Backed by Get-MailUser with -Identity {key}; the key resolves against ExternalDirectoryObjectId, alias, or primary SMTP.
GET /exchange/v1.0/mailUsers/{key} HTTP/1.1Authorization: Bearer {token}HTTP/1.1 200 OK
{ "@odata.context": "http://localhost:5043/exchange/v1.0/$metadata#mailUsers/$entity", "Id": "19ace2d2-ceaf-4ddf-a6c9-08ddb9eab4a4", "ExchangeGuid": "00000000-0000-0000-0000-000000000000", "Guid": "23078dde-6e0e-40a0-a9f7-779c3299b9a2", "DisplayName": "Carter, Sam", "SimpleDisplayName": "", "PhoneticDisplayName": null, "Name": "19ace2d2-ceaf-4ddf-a6c9-08ddb9eab4a4", "Alias": "sam.carter_contoso.com#EXT#", "DistinguishedName": "CN=19ace2d2-ceaf-4ddf-a6c9-08ddb9eab4a4,OU=contoso.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,DC=EURPR01A017,DC=PROD,DC=OUTLOOK,DC=COM", "Identity": "19ace2d2-ceaf-4ddf-a6c9-08ddb9eab4a4", "ExternalDirectoryObjectId": "19ace2d2-ceaf-4ddf-a6c9-08ddb9eab4a4", "PrimarySmtpAddress": "sam.carter@contoso.com", "WindowsLiveID": "sam.carter_contoso.com#EXT#@contoso.onmicrosoft.com", "WindowsEmailAddress": "", "EmailAddresses": [ "SMTP:sam.carter@contoso.com" ], "EmailAddressPolicyEnabled": false, "RecipientType": "MailUser", "RecipientTypeDetails": "GuestMailUser", "OrganizationalUnit": "eurpr01a017.prod.outlook.com/Microsoft Exchange Hosted Organizations/contoso.onmicrosoft.com", "OrganizationId": "EURPR01A017.PROD.OUTLOOK.COM/Microsoft Exchange Hosted Organizations/contoso.onmicrosoft.com - EURPR01A017.PROD.OUTLOOK.COM/ConfigurationUnits/contoso.onmicrosoft.com/Configuration", "CustomAttribute1": "", "CustomAttribute2": "", "CustomAttribute3": "", "CustomAttribute4": "", "CustomAttribute5": "", "ExtensionCustomAttribute1": [], "ExtensionCustomAttribute2": [], "ExtensionCustomAttribute3": [], "ExtensionCustomAttribute4": [], "ExtensionCustomAttribute5": [], "HiddenFromAddressListsEnabled": true, "AddressBookPolicy": null, "WhenCreated": "2026-05-15T22:55:35+03:00", "WhenChanged": "2026-05-15T23:43:13+03:00", "WhenCreatedUTC": "2026-05-15T19:55:35Z", "WhenChangedUTC": "2026-05-15T20:43:13Z", "ExternalEmailAddress": "SMTP:sam.carter@contoso.com", "UserPrincipalName": "sam.carter_contoso.com#EXT#@contoso.onmicrosoft.com", "FirstName": null, "LastName": null, "Title": null, "Department": null, "Company": null, "Office": null, "Phone": null, "MobilePhone": null, "Manager": null, "City": null, "StateOrProvince": null, "PostalCode": null, "CountryOrRegion": null, "AccountDisabled": false, "ExternalDirectoryObjectIdSet": false, "SamAccountName": "$JMVGI0-ND6TQ7JPC5HT", "AcceptMessagesOnlyFrom": [], "AcceptMessagesOnlyFromDLMembers": [], "AcceptMessagesOnlyFromSendersOrMembers": [], "AddressListMembership": [ "\\All Mail Users(VLV)", "\\All Recipients(VLV)" ], "AdministrativeUnits": [], "AgentIdentityBlueprintId": "", "AggregatedMailboxGuids": [], "ArbitrationMailbox": null, "ArchiveDatabase": null, "ArchiveGuid": "00000000-0000-0000-0000-000000000000", "ArchiveName": [], "ArchiveQuota": "100 GB (107,374,182,400 bytes)", "ArchiveRelease": "", "ArchiveStatus": "None", "ArchiveWarningQuota": "90 GB (96,636,764,160 bytes)", "BulkMailEnabled": false, "BypassModerationFromSendersOrMembers": [], "CalendarVersionStoreDisabled": false, "ComplianceTagHoldApplied": false, "CustomAttribute10": "", "CustomAttribute11": "", "CustomAttribute12": "", "CustomAttribute13": "", "CustomAttribute14": "", "CustomAttribute15": "", "CustomAttribute6": "", "CustomAttribute7": "", "CustomAttribute8": "", "CustomAttribute9": "", "DataEncryptionPolicy": null, "DelayHoldApplied": false, "DelayReleaseHoldApplied": false, "DeliverToMailboxAndForward": false, "DisabledArchiveDatabase": null, "DisabledArchiveGuid": "00000000-0000-0000-0000-000000000000", "EndDateForRetentionHold": null, "ExchangeObjectId": "05aeb349-a264-492c-90cc-213efeaec4a0", "ForwardingAddress": null, "GrantSendOnBehalfTo": [], "GuestHint": null, "GuestInfo": null, "HasPicture": false, "HasSpokenName": false, "ImmutableId": "", "InactiveMailboxRetireTime": null, "IsAgenticUser": false, "IsDirSynced": false, "IsInactiveMailbox": false, "IsMonitoringMailbox": false, "IsSoftDeletedByDisable": false, "IsSoftDeletedByRemove": false, "IssueWarningQuota": "98 GB (105,226,698,752 bytes)", "JoinedSmtpAddress": "", "JournalArchiveAddress": "", "LastExchangeChangedTime": null, "LegacyExchangeDN": "/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=c72fefb7b5254d28864ce50da237c9c2-19ace2d2-ce", "LitigationHoldDate": null, "LitigationHoldEnabled": false, "LitigationHoldOwner": "", "MacAttachmentFormat": "BinHex", "MailTip": null, "MailTipTranslations": [], "MailboxContainerGuid": null, "MailboxLocations": [ "1;7f26dee3-229d-48c8-98de-a333621a7cff;ComponentShared;EURPRD02.PROD.OUTLOOK.COM;fb6048e3-a9e3-418b-937c-d621c7c8276a" ], "MailboxMoveBatchName": "", "MailboxMoveFlags": "None", "MailboxMoveRemoteHostName": "", "MailboxMoveSourceMDB": null, "MailboxMoveStatus": "None", "MailboxMoveTargetMDB": null, "MailboxProvisioningConstraint": null, "MailboxProvisioningPreferences": [], "MailboxRegion": null, "MailboxRegionLastUpdateTime": null, "MailboxRegionSuffix": "None", "MailboxRelease": "", "MaxReceiveSize": "Unlimited", "MaxSendSize": "Unlimited", "MessageBodyFormat": "TextAndHtml", "MessageFormat": "Mime", "MicrosoftOnlineServicesID": "sam.carter_contoso.com#EXT#@contoso.onmicrosoft.com", "ModeratedBy": [], "ModerationEnabled": false, "NetID": "10032005E5A35A02", "OrganizationalUnitRoot": "contoso.onmicrosoft.com", "OrphanSoftDeleteTrackingTime": null, "OtherMail": "sam.carter@contoso.com", "PersistedCapabilities": [], "PoliciesExcluded": [ "{26491cfc-9e50-4857-861b-0cb8df22b5d7}" ], "PoliciesIncluded": [], "ProhibitSendQuota": "99 GB (106,300,440,576 bytes)", "ProhibitSendReceiveQuota": "100 GB (107,374,182,400 bytes)", "ProtocolSettings": [ "RemotePowerShell§1" ], "RecipientLimits": "Unlimited", "RecoverableItemsQuota": "30 GB (32,212,254,720 bytes)", "RecoverableItemsWarningQuota": "20 GB (21,474,836,480 bytes)", "RejectMessagesFrom": [], "RejectMessagesFromDLMembers": [], "RejectMessagesFromSendersOrMembers": [], "RequireSenderAuthenticationEnabled": false, "ResetPasswordOnNextLogon": false, "RetainDeletedItemsFor": "14.00:00:00", "RetentionComment": "", "RetentionHoldEnabled": false, "RetentionUrl": "", "SKUAssigned": null, "SendModerationNotifications": "Always", "SharedWithReference": "", "SingleItemRecoveryEnabled": false, "StartDateForRetentionHold": null, "StsRefreshTokensValidFrom": "2026-05-15T22:55:17+03:00", "UMDtmfMap": [], "UsageLocation": null, "UseMapiRichTextFormat": "Never", "UsePreferMessageFormat": false, "UserCertificate": [], "UserIdentityParent": "", "UserSMimeCertificate": [], "WasInactiveMailbox": false, "WhenMailboxCreated": null, "WhenSoftDeleted": null, "ExchangeUserAccountControl": "NormalAccount", "InPlaceHolds": []}Notes: GuestMailUser variant (external invitee): the alias and UPN carry the #EXT# suffix and ExternalEmailAddress points at the user’s home domain.
Related: GET /exchange/v1.0/mailUsers
Get a single mailUsers entry - not found
Section titled “Get a single mailUsers entry - not found”When the {key} does not resolve to any mail user (no matching ExternalDirectoryObjectId, alias, or SMTP address), Get-MailUser raises a not-found error which the middleware maps to a 404 with the canonical error envelope.
GET /exchange/v1.0/mailUsers/{key} HTTP/1.1Authorization: Bearer {token}HTTP/1.1 404 Not Found
{ "error": { "code": "NotFound", "message": "Exchange object 'does-not-exist-12345' could not be found.", "target": "identity", "innerError": { "cmdlet": "Get-MailUser" } }, "correlationId": "0HNLSU6PPVJ03:00000001"}Notes: The 404 is emitted by ExoExceptionMiddleware translating the cmdlet’s object-not-found error; correlationId is per-request.
Related: GET /exchange/v1.0/mailUsers, GET /exchange/v1.0/mailUsers/{key}
PATCH /exchange/v1.0/mailUsers/{key}
Section titled “PATCH /exchange/v1.0/mailUsers/{key}”PATCH /mailUsers/{key} - partial update via Set-MailUser. Returns 200 + updated entity.
Backing cmdlet: Set-MailUser. Role: Recipient.ReadWrite (Pro).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
acceptMessagesOnlyFrom |
body | |||
acceptMessagesOnlyFromDLMembers |
body | |||
acceptMessagesOnlyFromSendersOrMembers |
body | |||
alias |
body | |||
arbitrationMailbox |
body | |||
archiveGuid |
body | |||
archiveName |
body | |||
bypassModerationFromSendersOrMembers |
body | |||
createDTMFMap |
body | |||
customAttribute1 |
body | |||
customAttribute10 |
body | |||
customAttribute11 |
body | |||
customAttribute12 |
body | |||
customAttribute13 |
body | |||
customAttribute14 |
body | |||
customAttribute15 |
body | |||
customAttribute2 |
body | |||
customAttribute3 |
body | |||
customAttribute4 |
body | |||
customAttribute5 |
body | |||
customAttribute6 |
body | |||
customAttribute7 |
body | |||
customAttribute8 |
body | |||
customAttribute9 |
body | |||
dataEncryptionPolicy |
body | |||
displayName |
body | |||
emailAddresses |
body | |||
emailAddressPolicyEnabled |
body | |||
exchangeGuid |
body | |||
excludeFromOrgHolds |
body | |||
extensionCustomAttribute1 |
body | |||
extensionCustomAttribute2 |
body | |||
extensionCustomAttribute3 |
body | |||
extensionCustomAttribute4 |
body | |||
extensionCustomAttribute5 |
body | |||
externalEmailAddress |
body | |||
federatedIdentity |
body | |||
grantSendOnBehalfTo |
body | |||
hiddenFromAddressListsEnabled |
body | |||
immutableId |
body | |||
journalArchiveAddress |
body | |||
macAttachmentFormat |
body | |||
mailboxRegion |
body | |||
mailTip |
body | |||
mailTipTranslations |
body | |||
maxReceiveSize |
body | |||
maxSendSize |
body | |||
messageBodyFormat |
body | |||
messageFormat |
body | |||
microsoftOnlineServicesID |
body | |||
moderatedBy |
body | |||
moderationEnabled |
body | |||
name |
body | |||
password |
body | |||
primarySmtpAddress |
body | |||
recipientLimits |
body | |||
recoverableItemsQuota |
body | |||
recoverableItemsWarningQuota |
body | |||
rejectMessagesFrom |
body | |||
rejectMessagesFromDLMembers |
body | |||
rejectMessagesFromSendersOrMembers |
body | |||
removeOrphanedHolds |
body | |||
removePicture |
body | boolean (switch) | ||
removeSpokenName |
body | boolean (switch) | ||
requireSenderAuthenticationEnabled |
body | |||
resetPasswordOnNextLogon |
body | |||
samAccountName |
body | |||
secondaryAddress |
body | |||
secondaryDialPlan |
body | |||
sendModerationNotifications |
body | |||
simpleDisplayName |
body | |||
skipDualWrite |
body | boolean (switch) | ||
umDtmfMap |
body | |||
useMapiRichTextFormat |
body | |||
usePreferMessageFormat |
body | |||
userCertificate |
body | |||
userPrincipalName |
body | |||
userSMimeCertificate |
body | |||
windowsEmailAddress |
body | |||
dryRun |
query | bool (switch) |
Update a mail user
Section titled “Update a mail user”Partial update of a mail-enabled user via Set-MailUser. Send only the fields you want to change; the controller fetches and returns the updated entity (200).
PATCH /exchange/v1.0/mailUsers/{key} HTTP/1.1Authorization: Bearer {token}Content-Type: application/json
{ "displayName": "Exonaut Sample MailUser (Updated)", "mailTip": "This mailbox is an external mail user managed by Exonaut.", "hiddenFromAddressListsEnabled": true}HTTP/1.1 200 OKContent-Type: application/json
{ "Id": "exonaut-sample-mailUsers", "Identity": "exonaut-sample-mailUsers", "Name": "exonaut-sample-mailUsers", "DisplayName": "Exonaut Sample MailUser (Updated)", "MailTip": "This mailbox is an external mail user managed by Exonaut.", "HiddenFromAddressListsEnabled": true, "ExternalEmailAddress": "SMTP:exonaut.sample@contoso.com", "PrimarySmtpAddress": "exonaut-sample-mailUsers@contoso.com"}Notes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.
Related: GET /exchange/v1.0/mailUsers
DELETE /exchange/v1.0/mailUsers/{key}
Section titled “DELETE /exchange/v1.0/mailUsers/{key}”DELETE /mailUsers/{key} - destructive. Use ?permanentlyDelete=true to skip the recoverable-items window.
Backing cmdlet: Remove-MailUser. Role: Recipient.ReadWrite (Pro).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
permanentlyDelete |
query | bool (switch) | ||
dryRun |
query | bool (switch) |
Delete a mail user
Section titled “Delete a mail user”Removes a mail-enabled user via Remove-MailUser. Use ?permanentlyDelete=true to skip the recoverable-items window. Returns 204 No Content.
DELETE /exchange/v1.0/mailUsers/{key} HTTP/1.1Authorization: Bearer {token}Content-Type: application/jsonHTTP/1.1 204 No ContentNotes: Doc-derived from Wiki + write-param allowlist; not live-captured. Body fields are Wiki-valid; values are illustrative.
Related: GET /exchange/v1.0/mailUsers
?dryRun=true previews of any write stay on Community.

