Microsoft 365 supported attributes and error handling

The following tables show the supported attributes and error handling values for Microsoft™ 365.

Supported attributes

Table 1. Attributes
Attribute name Definition Mapped Cloud Directory attribute (default mapping) Type Mandatory Modifiable
displayName User's display name name String Yes Yes
mailNickname User's nickname None String Yes Yes
userPrincipalName This attribute is used for uniqueness. email String Yes No
country User's country work_country String No Yes
department User's department department String No Yes
jobTitle User's job title job_title String No Yes
preferredLanguage User's preferred language language String No Yes
givenName User's given name given_name String No Yes
surname User's surname family_name String No Yes
mobilePhone User's mobile number mobile_number String No Yes
usageLocation The two-letter ISO standard 3166 country code that is required for assigning a license to a user. None String No

Mandatory for license assignments only.

Yes
email The email address of the user you're inviting. None String No

Mandatory for guest user provisioning only.

Yes
userType A string value that can be used to classify user types in your directory. The possible values are Member and Guest. None String No

Mandatory for guest user provisioning only.

Yes
inviteRedirectUrl The URL the user should be redirected to after the invitation is redeemed. None String No

Mandatory for guest user provisioning only.

No
sendInvitationMessage Indicates whether an email should be sent to the user being invited. The default is false. None Boolean No

Mandatory for guest user provisioning only.

No
customizedMessageBody Customized message body you want to send if you don't want the default message. Only plain text is allowed None String No

Mandatory for guest user provisioning only.

No

Error handling

Table 2. Error codes
Sr. No. Status code Definition
1. 400® Invalid input error
2. 401 Authentication error
3. 403 Forbidden error
4. 404 Resource not found error.
5. 409 Resource conflict error
6. 429 Confirmed rate limit error