Users
Retrieves all Azure AD user accounts within the authenticated permissions.
Table Specific Information
Select
Query the Users table. The connector will use the Azure Active Directory API to process WHERE clause conditions built with the following columns and operators. The rest of the filter is executed client side within the connector.
- Id supports the '=' operator.
For example, the following query is processed server side:
SELECT * FROM Users WHERE Id = '08d30c14-2775-45c9-8809-3eca47340959'
Note: when querying the Users table with an asterik (*), only the default columns will be returned. (i.e. businessPhones, displayName, givenName, id, jobTitle, mail, mobilePhone, officeLocation, preferredLanguage, surname, userPrincipalName)
To get the data for extra columns in the Users table, you must provide them in the query. For example:
SELECT id, department, officeLocation, state, displayName, mail FROM Users
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')
Update
To update a user record you need to specify the Id in WHERE clause.
UPDATE Users SET JobTitle = 'New Job Title' WHERE Id = 'bc48eaf7-0dc6-45d1-b17a-5b5397466ee1'
Delete
To delete a user record, you need to specify the Id in WHERE clause.
DELETE FROM Users WHERE Id = 'bc48eaf7-0dc6-45d1-b17a-5b5397466ee1'
GetDeleted
Retrieve recently deleted users. Deleted users remain available for up to 30 days.
GETDELETED FROM Users
Columns
Name | Type | ReadOnly | Description |
Manager_Id | String | False |
The id of the manager. |
Manager_DisplayName | String | False |
The displayName of the manager. |
id [KEY] | String | False |
The id of the user. |
deletedDateTime | Datetime | False |
The deletedDateTime of the user. |
accountEnabled | Bool | False |
Indicates if accountEnabled for the user. |
assignedLicenses | String | False |
The assignedLicenses of the user. |
businessPhones | String | False |
The businessPhones of the user. |
city | String | False |
The city of the user. |
companyName | String | False |
The companyName of the user. |
country | String | False |
The country of the user. |
createdDateTime | Datetime | False |
The createdDateTime of the user. |
department | String | False |
The department of the user. |
displayName | String | False |
The displayName of the user. |
employeeHireDate | Datetime | False |
The employeeHireDate of the user. |
employeeId | String | False |
The employeeId of the user. |
employeeOrgData_costCenter | String | False |
The employeeOrgData_costCenter of the user. |
employeeOrgData_division | String | False |
The employeeOrgData_division of the user. |
employeeType | String | False |
The employeeType of the user. |
givenName | String | False |
The givenName of the user. |
identities | String | False |
The identities of the user. |
imAddresses | String | False |
The imAddresses of the user. |
isManagementRestricted | Bool | False |
Indicator if user is management restricted. |
isResourceAccount | Bool | False |
Indicates if it isResourceAccount of the user. |
jobTitle | String | False |
The jobTitle of the user. |
lastPasswordChangeDateTime | Datetime | False |
The lastPasswordChangeDateTime of the user. |
String | False |
The mail of the user. | |
mailNickname | String | False |
The mailNickname of the user. |
mobilePhone | String | False |
The mobilePhone of the user. |
officeLocation | String | False |
The officeLocation of the user. |
onPremisesDistinguishedName | String | False |
The onPremisesDistinguishedName of the user. |
onPremisesDomainName | String | False |
The onPremisesDomainName of the user. |
onPremisesExtensionAttributes_extensionAttribute1 | String | False |
The onPremisesExtensionAttributes_extensionAttribute1 of the user. |
onPremisesExtensionAttributes_extensionAttribute10 | String | False |
The onPremisesExtensionAttributes_extensionAttribute10 of the user. |
onPremisesExtensionAttributes_extensionAttribute11 | String | False |
The onPremisesExtensionAttributes_extensionAttribute11 of the user. |
onPremisesExtensionAttributes_extensionAttribute12 | String | False |
The onPremisesExtensionAttributes_extensionAttribute12 of the user. |
onPremisesExtensionAttributes_extensionAttribute13 | String | False |
The onPremisesExtensionAttributes_extensionAttribute13 of the user. |
onPremisesExtensionAttributes_extensionAttribute14 | String | False |
The onPremisesExtensionAttributes_extensionAttribute14 of the user. |
onPremisesExtensionAttributes_extensionAttribute15 | String | False |
The onPremisesExtensionAttributes_extensionAttribute15 of the user. |
onPremisesExtensionAttributes_extensionAttribute2 | String | False |
The onPremisesExtensionAttributes_extensionAttribute2 of the user. |
onPremisesExtensionAttributes_extensionAttribute3 | String | False |
The onPremisesExtensionAttributes_extensionAttribute3 of the user. |
onPremisesExtensionAttributes_extensionAttribute4 | String | False |
The onPremisesExtensionAttributes_extensionAttribute4 of the user. |
onPremisesExtensionAttributes_extensionAttribute5 | String | False |
The onPremisesExtensionAttributes_extensionAttribute5 of the user. |
onPremisesExtensionAttributes_extensionAttribute6 | String | False |
The onPremisesExtensionAttributes_extensionAttribute6 of the user. |
onPremisesExtensionAttributes_extensionAttribute7 | String | False |
The onPremisesExtensionAttributes_extensionAttribute7 of the user. |
onPremisesExtensionAttributes_extensionAttribute8 | String | False |
The onPremisesExtensionAttributes_extensionAttribute8 of the user. |
onPremisesExtensionAttributes_extensionAttribute9 | String | False |
The onPremisesExtensionAttributes_extensionAttribute9 of the user. |
onPremisesImmutableId | String | False |
The onPremisesImmutableId of the user. |
onPremisesLastSyncDateTime | Datetime | False |
The onPremisesLastSyncDateTime of the user. |
onPremisesProvisioningErrors | String | False |
The onPremisesProvisioningErrors of the user. |
onPremisesSamAccountName | String | False |
The onPremisesSamAccountName of the user. |
onPremisesSecurityIdentifier | String | False |
The onPremisesSecurityIdentifier of the user. |
onPremisesSyncEnabled | Bool | False |
Indicates onPremisesSyncEnabled for the user. |
onPremisesUserPrincipalName | String | False |
The onPremisesUserPrincipalName of the user. |
otherMails | String | False |
The otherMails of the user. |
passwordProfile_forceChangePasswordNextSignIn | Bool | False |
The passwordProfile_forceChangePasswordNextSignIn of the user. |
passwordProfile_forceChangePasswordNextSignInWithMfa | Bool | False |
The passwordProfile_forceChangePasswordNextSignInWithMfa of the user. |
passwordProfile_password | String | False |
The passwordProfile_password of the user. |
postalCode | String | False |
The postalCode of the user. |
preferredLanguage | String | False |
The preferredLanguage of the user. |
serviceProvisioningErrors | String | False |
The service provisioning errors of the user. |
state | String | False |
The state of the user. |
streetAddress | String | False |
The streetAddress of the user. |
surname | String | False |
The surname of the user. |
userPrincipalName | String | False |
The userPrincipalName of the user. |
userType | String | False |
The userType of the user. |