Users
Contains directory information for Exchange users, including user IDs, display names, job titles, and email addresses. It serves as a foundational entity for joining with activity and usage datasets.
Table Specific Information
Select
Query the Users table by retrieving everything from Users, specifying a Id, or filtering by a column:
SELECT * FROM Users WHERE Id = '616391f0-32d8-4127-8f25-aa55771d6617' SELECT DisplayName, Id FROM Users WHERE DisplayName LIKE 'John%'
Insert
The following are required to create a new organizational User:
INSERT INTO Users (AccountEnabled, DisplayName, MailNickname, UserPrincipalName, PasswordProfile_ForceChangePasswordNextSignIn, PasswordProfile_Password) VALUES (false, 'John Smith', 'JohnS', '[email protected]', true, '123password')
Columns
| Name | Type | ReadOnly | Description |
| id [KEY] | String | False |
The unique identifier assigned to the user by Azure Active Directory. Used internally to track user objects. |
| deletedDateTime | Datetime | False |
The date and time when the user account was deleted. Null if the user is still active. |
| aboutMe | String | False |
A short description or bio written by the user. Displayed in Microsoft 365 profile cards. |
| accountEnabled | Bool | False |
Indicates whether the user account is active and allowed to sign in. A value of true means the account is enabled. |
| ageGroup | String | False |
Specifies the age classification of the user. Typical values include Minor, NotAdult, and Adult, used for compliance purposes. |
| assignedLicenses | String | False |
A comma-separated list of licenses assigned to the user, identifying available services like Teams, Exchange, and SharePoint. |
| assignedPlans | String | False |
Details of service plans provisioned for the user, corresponding to each license assigned (for example, Exchange and OneDrive). |
| birthday | Datetime | False |
The user's birthdate, if provided. Used in profile details and some personalized experiences. |
| businessPhones | String | False |
A comma-separated list of the user's business phone numbers. |
| city | String | False |
The city associated with the user's business address or physical location. |
| companyName | String | False |
The name of the user's employer or organization, as defined in their Azure AD profile. |
| consentProvidedForMinor | String | False |
Indicates whether parental or guardian consent was provided for a minor using Microsoft services. |
| country | String | False |
The country or region in which the user resides or works. Used in determining localization and licensing rules. |
| department | String | False |
The department within the organization that the user belongs to (for example, Sales or IT). |
| deviceEnrollmentLimit | Int | False |
The maximum number of devices the user is allowed to enroll in device management systems such as Intune. |
| displayName | String | False |
The full display name of the user as shown in the Microsoft 365 directory and communication tools. |
| employeeId | String | False |
A custom employee identifier typically used by HR systems for internal tracking and integration. |
| faxNumber | String | False |
The user's business fax number, if applicable. |
| givenName | String | False |
The user's first name or personal name as recorded in their profile. |
| hireDate | Datetime | False |
The date the user was hired, often used in HR reports or onboarding workflows. |
| imAddresses | String | False |
A list of instant messaging addresses associated with the user, usually used with Skype for Business or Teams. |
| interests | String | False |
A comma-separated list of personal or professional interests specified in the user's profile. |
| isResourceAccount | Bool | False |
Indicates whether the user account represents a non-human resource like a conference room or shared mailbox. |
| jobTitle | String | False |
The user's job title or position within the organization (for example, Project Manager). |
| legalAgeGroupClassification | String | False |
Classifies the user into a legal age group based on regional regulations. Common values include MinorWithParentalConsent, NotAdult, and Adult. |
| licenseAssignmentStates | String | False |
Details the current state of each license assigned to the user, such as active, pending, or suspended. |
| String | False |
The user's primary email address, often used as their main communication channel. | |
| mailboxSettings_automaticRepliesSetting_status | String | False |
Specifies whether automatic replies (out-of-office) are currently enabled for the user's mailbox. |
| mailboxSettings_automaticRepliesSetting_externalAudience | String | False |
Indicates whether automatic replies are sent to external senders and to whom (for example, None, ContactsOnly, or All). |
| mailboxSettings_automaticRepliesSetting_scheduledStartDateTime_dateTime | String | False |
The start date and time for scheduled automatic replies in the user's mailbox. |
| mailboxSettings_automaticRepliesSetting_scheduledStartDateTime_timeZone | String | False |
The time zone used for scheduling automatic replies in the user's mailbox settings. |
| mailboxSettings_automaticRepliesSetting_internalReplyMessage | String | False |
The message sent in automatic replies to internal senders within the same organization. |
| mailboxSettings_automaticRepliesSetting_externalReplyMessage | String | False |
The message sent in automatic replies to external senders outside the organization. |
| mailboxSettings_archiveFolder | String | False |
The folder path where archived emails are stored in the user's mailbox. |
| mailboxSettings_timeZone | String | False |
The user's mailbox time zone setting used for calendar events and automatic replies. |
| mailboxSettings_language_locale | String | False |
The locale setting (language and region code) for the user's mailbox (for example, en-US). |
| mailboxSettings_language_displayName | String | False |
The display name for the language setting in the user's mailbox (for example, English (United States)). |
| mailboxSettings_workingHours_daysOfWeek | String | False |
The days of the week the user is scheduled to work, based on their Outlook calendar settings. |
| mailboxSettings_workingHours_startTime | Time | False |
The starting time of the user's typical workday as defined in Outlook settings. |
| mailboxSettings_workingHours_endTime | Time | False |
The ending time of the user's typical workday as defined in Outlook settings. |
| mailboxSettings_workingHours_timeZone_name | String | False |
The time zone name used in defining the user's working hours schedule. |
| mailNickname | String | False |
An alias used for sending mail, often a simplified or alternate version of the user's email address. |
| mobilePhone | String | False |
The user's mobile phone number used for contact and multi-factor authentication. |
| mySite | String | False |
The URL to the user's personal SharePoint or OneDrive site (My Site). |
| officeLocation | String | False |
The physical location or office address where the user is based (for example, Building 1 or Floor 2). |
| onPremisesDistinguishedName | String | False |
The distinguished name (DN) of the user from the on-premises Active Directory. |
| onPremisesDomainName | String | False |
The domain name of the on-premises environment where the user account originated. |
| onPremisesExtensionAttributes_extensionAttribute1 | String | False |
A customizable field from the on-premises directory, used for additional metadata. |
| onPremisesExtensionAttributes_extensionAttribute2 | String | False |
Custom on-premises extension attribute 2. |
| onPremisesExtensionAttributes_extensionAttribute3 | String | False |
Custom on-premises extension attribute 3. |
| onPremisesExtensionAttributes_extensionAttribute4 | String | False |
Custom on-premises extension attribute 4. |
| onPremisesExtensionAttributes_extensionAttribute5 | String | False |
Custom on-premises extension attribute 5. |
| onPremisesExtensionAttributes_extensionAttribute6 | String | False |
Custom on-premises extension attribute 6. |
| onPremisesExtensionAttributes_extensionAttribute7 | String | False |
Custom on-premises extension attribute 7. |
| onPremisesExtensionAttributes_extensionAttribute8 | String | False |
Custom on-premises extension attribute 8. |
| onPremisesExtensionAttributes_extensionAttribute9 | String | False |
Custom on-premises extension attribute 9. |
| onPremisesExtensionAttributes_extensionAttribute10 | String | False |
Custom on-premises extension attribute 10. |
| onPremisesExtensionAttributes_extensionAttribute11 | String | False |
Custom on-premises extension attribute 11. |
| onPremisesExtensionAttributes_extensionAttribute12 | String | False |
Custom on-premises extension attribute 12. |
| onPremisesExtensionAttributes_extensionAttribute13 | String | False |
Custom on-premises extension attribute 13. |
| onPremisesExtensionAttributes_extensionAttribute14 | String | False |
Custom on-premises extension attribute 14. |
| onPremisesExtensionAttributes_extensionAttribute15 | String | False |
Custom on-premises extension attribute 15. |
| onPremisesImmutableId | String | False |
A unique identifier used to match on-premises and cloud accounts for synchronization. |
| onPremisesLastSyncDateTime | Datetime | False |
The last time the user's on-premises identity was synchronized with Azure Active Directory. |
| onPremisesProvisioningErrors | String | False |
A list of errors encountered during the synchronization or provisioning of the user's on-premises identity. |
| onPremisesSamAccountName | String | False |
The Security Account Manager (SAM) name for the user from on-premises Active Directory. |
| onPremisesSecurityIdentifier | String | False |
The security identifier (SID) for the user from on-premises Active Directory, used for access control. |
| onPremisesSyncEnabled | Bool | False |
Indicates whether the user's identity is synchronized from an on-premises directory. True means the account is synced. |
| onPremisesUserPrincipalName | String | False |
The UPN of the user as it exists in the on-premises directory, used during hybrid identity scenarios. |
| otherMails | String | False |
Additional email addresses associated with the user. These can be used as alternate contact methods. |
| passwordPolicies | String | False |
Specifies password policy settings for the user such as 'DisablePasswordExpiration' or 'DisableStrongPassword'. |
| passwordProfile_password | String | False |
The user's password, typically only accessible during account creation or reset workflows. |
| passwordProfile_forceChangePasswordNextSignIn | Bool | False |
Indicates whether the user is required to change their password at the next sign-in. |
| passwordProfile_forceChangePasswordNextSignInWithMfa | Bool | False |
Indicates whether the user must perform MFA along with password change at the next sign-in. |
| pastProjects | String | False |
A comma-separated list of past projects listed in the user's profile. Typically entered manually by the user. |
| postalCode | String | False |
The ZIP or postal code associated with the user's office or mailing address. |
| preferredLanguage | String | False |
The user's preferred locale for the Microsoft 365 interface and communications (for example, en-US). |
| preferredName | String | False |
An alternative name or nickname preferred by the user, displayed in various Microsoft 365 applications. |
| provisionedPlans | String | False |
A list of service plans that have been provisioned for the user, such as Exchange Online or Teams. |
| proxyAddresses | String | False |
A list of proxy email addresses assigned to the user. Includes SMTP and SIP addresses used for routing. |
| responsibilities | String | False |
A list of work responsibilities or duties defined in the user's profile. |
| schools | String | False |
Educational institutions attended by the user, often self-reported in Microsoft Delve or profile cards. |
| showInAddressList | Bool | False |
Indicates whether the user appears in the global address list (GAL). |
| signInSessionsValidFromDateTime | Datetime | False |
The time from which the user's active sign-in sessions remain valid. Used to revoke previous sign-ins after password changes. |
| skills | String | False |
A list of professional skills or competencies the user has added to their profile. |
| state | String | False |
The state, province, or administrative region associated with the user's office location. |
| streetAddress | String | False |
The street address portion of the user's business or mailing address. |
| surname | String | False |
The user's last name or family name. |
| usageLocation | String | False |
The country or region where the user consumes Microsoft 365 services. Important for license assignment and tax rules. |
| userPrincipalName | String | False |
The user's sign-in name for Microsoft 365, formatted as an email address. Used for authentication. |
| userType | String | False |
Specifies the type of user, whether it is a Member (internal users) or Guest (external users). |