Table of Contents

User.EnableDisableAccount.All

Allows the app to enable and disable users' accounts, on behalf of the signed-in user.

Merill's Note

For an app to access data in Microsoft Graph, the user or administrator must grant it the permissions it needs. This article lists all the Microsoft Graph APIs and your tenant data that can be accessed by the application (vendor/developer) if you consent to the User.EnableDisableAccount.All permission.

If you need to create an audit report of the permissions granted to all the apps in your tenant, you can run the Export-MsIdAppConsentGrantReport command. See How To: Run a quick OAuth app audit of your tenant

Category Application Delegated
Identifier 3011c876-62b7-4ada-afa2-506cbbecc68c f92e74e7-2563-467f-9dd0-902688cb5863
DisplayText Enable and disable user accounts Enable and disable user accounts
Description Allows the app to enable and disable users' accounts, without a signed-in user. Allows the app to enable and disable users' accounts, on behalf of the signed-in user.
AdminConsentRequired Yes Yes

Graph Methods

Resources

Granting this permission allows the calling application to access (and/or update) the following information in your tenant.

Graph reference: agentUser

Property Type Description
accountEnabled Boolean true if the account is enabled; otherwise, false. This property is required when creating the object. Inherited from user.
assignedLicenses assignedLicense collection The licenses that are assigned to the agent user, including inherited (group-based) licenses. This property doesn't differentiate between directly assigned and inherited licenses. Use the licenseAssignmentStates property to identify the directly assigned and inherited licenses. Not nullable. Inherited from user.
assignedPlans assignedPlan collection The plans that are assigned to the agent user. Read-only. Not nullable. Inherited from user.
businessPhones String collection The telephone numbers for the agent user. Only one number can be set for this property. Read-only for users synced from on-premises directory. Inherited from user.
city String The city where the agent user is located. Maximum length is 128 characters. Inherited from user.
cloudRealtimeCommunicationInfo cloudRealtimeCommunicationInfo Microsoft realtime communication information related to the agent user. Inherited from user.
companyName String The name of the company the agent user is associated with. This property can be useful for describing the company that an external user comes from. The maximum length is 64 characters. Inherited from user.
country String The country or region where the agent user is located; for example, US or UK. Maximum length is 128 characters. Inherited from user.
createdDateTime DateTimeOffset The date and time the agent user was created in ISO 8601 format and UTC. The value cannot be modified and is automatically populated when the entity is created. Nullable. For on-premises users, the value represents when they were first created in Microsoft Entra ID. Property is null for some users created before June 2018 and on-premises users synced to Microsoft Entra ID before June 2018. Read-only. Inherited from user.
creationType String Read-only. Null. Inherited from user.
customSecurityAttributes customSecurityAttributeValue An open complex type that holds the value of a custom security attribute that is assigned to a directory object. Nullable. Inherited from user.
deletedDateTime DateTimeOffset The date and time the user was deleted. Inherited from directoryObject.
department String The name of the department where the user works. Maximum length is 64 characters. Inherited from user.
displayName String The name displayed in the address book for the user. This value is usually the combination of the user's first name, middle initial, and last name. This property is required when a user is created, and it cannot be cleared during updates. Maximum length is 256 characters. Inherited from user.
employeeHireDate DateTimeOffset The date and time when the user was hired or will start work if there is a future hire. Inherited from user.
employeeId String The employee identifier assigned to the user by the organization. The maximum length is 16 characters. Inherited from user.
employeeLeaveDateTime DateTimeOffset The date and time when the user left or will leave the organization. To read this property, the calling app must be assigned the User-LifeCycleInfo.Read.All permission. To write this property, the calling app must be assigned the User.Read.All and User-LifeCycleInfo.ReadWrite.All permissions. To read this property in delegated scenarios, the admin needs at least one of the following Microsoft Entra roles: Lifecycle Workflows Administrator (least privilege), Global Reader. To write this property in delegated scenarios, the admin needs the Global Administrator role. For more information, see Configure the employeeLeaveDateTime property for a user. Inherited from user.
employeeOrgData employeeOrgData Represents organization data (for example, division and costCenter) associated with a user. Inherited from user.
employeeType String Captures enterprise worker type. For example, Employee, Contractor, Consultant, or Vendor. Inherited from user.
faxNumber String The fax number of the user. Inherited from user.
givenName String The given name (first name) of the user. Maximum length is 64 characters. Inherited from user.
id String The unique identifier for the user. It should be treated as an opaque identifier. Inherited from directoryObject. Not nullable. Read-only. Inherits from entity
identityParentId String References the object ID of the associated agent identity. This property is required when creating the object, and it can't be cleared during updates. Inherited from user.
imAddresses String collection The instant message voice-over IP (VOIP) session initiation protocol (SIP) addresses for the user. Read-only. Inherited from user.
infoCatalogs String collection Identifies the info segments assigned to the user. Inherited from user.
isLicenseReconciliationNeeded Boolean Indicates whether the user is pending an exchange mailbox license assignment. Read-only. Inherited from user.
isManagementRestricted Boolean true if the user is a member of a restricted management administrative unit. If not set, the default value is null and the default behavior is false. Read-only. To manage a user who is a member of a restricted management administrative unit, the administrator or calling app must be assigned a Microsoft Entra role at the scope of the restricted management administrative unit. Inherited from user.
isResourceAccount Boolean Do not use – reserved for future use. Inherited from user.
jobTitle String The user's job title. Maximum length is 128 characters. Inherited from user.
licenseAssignmentStates licenseAssignmentState collection State of license assignments for this user. It also indicates licenses that are directly assigned and the ones the user inherited through group memberships. Read-only. Inherited from user.
mail String The SMTP address for the user, for example, [email protected]. Changes to this property also update the user's proxyAddresses collection to include the value as an SMTP address. This property can't contain accent characters. NOTE: We don't recommend updating this property for Azure AD B2C user profiles. Use the otherMails property instead. Inherited from user.
mailNickname String The mail alias for the user. This property must be specified when a user is created. Maximum length is 64 characters. Inherited from user.
mobilePhone String The primary cellular telephone number for the user. Read-only for users synced from the on-premises directory. Inherited from user.
officeLocation String The office location in the user's place of business. Maximum length is 128 characters. Inherited from user.
otherMails String collection A list of additional email addresses for the user; for example: "[email protected]", "[email protected]"]. Can store up to 250 values, each with a limit of 250 characters. NOTE: This property can't contain accent characters. Inherited from [user.
postalCode String The postal code for the user's postal address. The postal code is specific to the user's country/region. In the United States of America, this attribute contains the ZIP code. Maximum length is 40 characters. Inherited from user.
preferredDataLocation String The preferred data location for the user. For more information, see OneDrive Online Multi-Geo. Inherited from user.
preferredLanguage String The preferred language for the user. The preferred language format is based on RFC 4646. The name combines an ISO 639 two-letter lowercase culture code associated with the language and an ISO 3166 two-letter uppercase subculture code associated with the country or region. Example: "en-US", or "es-ES". Inherited from user.
provisionedPlans provisionedPlan collection The plans that are provisioned for the user. Read-only. Not nullable. Inherited from user.
proxyAddresses String collection For example: "SMTP: [email protected]", "smtp: [email protected]"]. Changes to the mail property also update this collection to include the value as an SMTP address. For more information, see [mail and proxyAddresses properties. The proxy address prefixed with SMTP (capitalized) is the primary proxy address, while the ones prefixed with smtp are the secondary proxy addresses. For Azure AD B2C accounts, this property has a limit of 10 unique addresses. Read-only in Microsoft Graph; you can update this property only through the Microsoft 365 admin center. Not nullable. Inherited from user.
refreshTokensValidFromDateTime DateTimeOffset Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications get an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). If it happens, the application must acquire a new refresh token by requesting the authorized endpoint. Read-only. Use invalidateAllRefreshTokens to reset. Inherited from user.
securityIdentifier String Security identifier (SID) of the user, used in Windows scenarios. Read-only. Returned by default. Inherited from user.
showInAddressList Boolean Do not use in Microsoft Graph. Manage this property through the Microsoft 365 admin center instead. Represents whether the agent user should be included in the Outlook global address list. See Known issue. Inherited from user.
signInSessionsValidFromDateTime DateTimeOffset Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications get an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). If this happens, the application must acquire a new refresh token by requesting the authorized endpoint. Read-only. Use revokeSignInSessions to reset. Inherited from user.
state String The state or province in the agent user's address. Maximum length is 128 characters. Inherited from user.
streetAddress String The street address of the agent user's place of business. Maximum length is 1024 characters. Inherited from user.
surname String The user's surname (family name or last name). Maximum length is 64 characters. Inherited from user.
usageLocation String A two-letter country code (ISO standard 3166). Required for agent users that are assigned licenses due to legal requirements to check for availability of services in countries. Examples include: US, JP, and GB. Not nullable. Inherited from user.
userPrincipalName String The user principal name (UPN) of the agent user. The UPN is an Internet-style sign-in name for the user based on the Internet standard RFC 822. By convention, this should map to the agent user's email name. The general format is alias@domain, where the domain must be present in the tenant's verified domain collection. This property is required when a user is created. The verified domains for the tenant can be accessed from the verifiedDomains property of organization. NOTE: This property can't contain accent characters. Only the following characters are allowed A - Z, a - z, 0 - 9, ' . - _ ! # ^ ~. For the complete list of allowed characters, see username policies. Inherited from user.
userType String A String value that can be used to classify agent user types in your directory. The possible values are Member and Guest. **N