Connectors
...
Actions
Update User
6 min
description updates a user's account status in azure active directory using their unique id and the 'accountenabled' parameter endpoint url /v1 0/users/{{id}} method patch inputs path parameters (object) – required id (string) – required json body (object) – required aboutme (string) a freeform text entry field for the user to describe themselves accountenabled (string) – required true if the account is enabled; otherwise, false this property is required when a user is created a global administrator assigned the directory accessasuser all delegated permission can update the accountenabled status of all administrators in the tenant agegroup (string) sets the age group of the user allowed values \ null , minor, notadult and adult refer to the legal age group property definitions for further information birthday (string) the birthday of the user the timestamp type represents date and time information using iso 8601 format and is always in utc time for example, midnight utc on jan 1, 2014 is 2014 01 01t00 00 00z businessphones (string) the telephone numbers for the user note \ although this is a string collection, only one number can be set for this property city (string) the city in which the user is located companyname (string) the company name which the user is associated this property can be useful for describing the company that an external user comes from the maximum length is 64 characters consentprovidedforminor (string) sets whether consent has been obtained for minors allowed values \ null , granted, denied and notrequired refer to the legal age group property definitions for further information country (string) the country/region in which the user is located; for example, us or uk department (string) the name for the department in which the user works displayname (string) the name displayed in the address book for the user this 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 employeeid (string) the employee identifier assigned to the user by the organization the maximum length is 16 characters employeetype (string) captures enterprise worker type for example, employee, contractor, consultant, or vendor returned only on $select givenname (string) the given name (first name) of the user employeehiredate (string) the hire date of the user the timestamp type represents date and time information using iso 8601 format and is always in utc time for example, midnight utc on jan 1, 2014 is 2014 01 01t00 00 00z employeeleavedatetime (string) the date and time when the user left or will leave the organization the timestamp type represents date and time information using iso 8601 format and is always in utc time for example, midnight utc on jan 1, 2014 is 2014 01 01t00 00 00z employeeorgdata (string) represents organization data (e g division and costcenter) associated with a user interests (string) a list for the user to describe their interests jobtitle (string) the user's job title mail (string) the smtp address for the user, for example, jeff\@contoso onmicrosoft com mailto\ jeff\@contoso onmicrosoft com changes to this property will also update the user's proxyaddresses collection to include the value as a smtp address for azure ad b2c accounts, this property can be updated up to only ten times with unique smtp addresses cannot be updated to null mailnickname (string) the mail alias for the user this property must be specified when a user is created mobilephone (string) the primary cellular telephone number for the user mysite (string) the url for the user's personal site officelocation (string) the office location in the user's place of business onpremisesextensionattributes (string) contains extensionattributes 1 15 for the user note that the individual extension attributes are neither selectable nor filterable for an onpremisessyncenabled user, the source of authority for this set of properties is the on premises and is read only and is read only these extension attributes are also known as exchange custom attributes 1 15 onpremisesimmutableid (string) this property is used to associate an on premises active directory user account to their azure ad user object this property must be specified when creating a new user account in the graph if you are using a federated domain for the user's userprincipalname (upn) property important \ the $ and characters cannot be used when specifying this property othermails (string) a list of additional email addresses for the user; for example \[" bob\@contoso com mailto\ bob\@contoso com ", " robert\@fabrikam com mailto\ robert\@fabrikam com "] passwordpolicies (string) specifies password policies for the user this value is an enumeration with one possible value being disablestrongpassword, which allows weaker passwords than the default policy to be specified disablepasswordexpiration can also be specified the two may be specified together; for example \ disablepasswordexpiration , disablestrongpassword passwordprofile (object) specifies the password profile for the user the profile contains the user's password the password in the profile must satisfy minimum requirements as specified by the passwordpolicies property by default, a strong password is required as a best practice, always set the forcechangepasswordnextsignin to true this cannot be used for federated users pastprojects (string) a list for the user to enumerate their past projects 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 preferredlanguage (string) the preferred language for the user should follow iso 639 1 code; for example en us responsibilities (string) a list for the user to enumerate their responsibilities schools (string) a list for the user to enumerate the schools they have attended skills (string) a list for the user to enumerate their skills state (string) the state or province in the user's address streetaddress (string) the street address of the user's place of business surname (string) the user's surname (family name or last name) usagelocation (string) a two letter country code (iso standard 3166) required for users that will be assigned licenses due to legal requirement to check for availability of services in countries examples include \ us , jp, and gb not nullable userprincipalname (string) the user principal name (upn) of the user the upn is an internet style login name for the user based on the internet standard rfc 822 by convention, this should map to the user's email name the general format is alias\@domain, where domain must be present in the tenant's collection of verified domains the verified domains for the tenant can be accessed from the verifieddomains property of organization usertype (string) a string value that can be used to classify user types in your directory, such as member and guest output example \[ { "status code" 200, "response headers" { "date" "fri, 18 aug 2023 11 47 19 gmt", "content type" "text/html; charset=utf 8", "content length" "1000", "connection" "keep alive", "cache control" "private", "content encoding" "gzip", "vary" "accept encoding", "x content type options" "nosniff", "x xss protection" "1; mode=block", "x ms version" "12 43 2 1 (v12 42 0 1#6c4023fb99 230803 0127) signed", "strict transport security" "max age=31536000; includesubdomains", "x ua compatible" "ie=edge", "x frame options" "sameorigin", "x azure ref" "20230818t114719z v7556zx97h4335ppu1mubfv65s000000021g00000000yd3z", "x cache" "config nocache", "accept ranges" "bytes" }, "reason" "ok", "response text" "" } ] output parameters status code (number) reason (string) response text (string) response headers header type date string content type string content length string connection string cache control string content encoding string vary string x content type options string x xss protection string x ms version string strict transport security string x ua compatible string x frame options string x azure ref string x cache string accept ranges string