Microsoft: Update user — me User update User
Microsoft meUser.updateUser: arguments, response, policy and SDK examples.
← Me user operations · Get started
Operation microsoft.me_user_updateuser
Provider route: PATCH /me. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/microsoft with npm, or alter-sdk-microsoft with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { MicrosoftIntegration } from "@alter-ai/microsoft";
async function execute(input: Parameters<MicrosoftIntegration["meUser"]["updateUser"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new MicrosoftIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.meUser.updateUser(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_microsoft import MicrosoftIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = MicrosoftIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.me_user.update_user(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | Model | Required within parent | Expand Create User — request body — body |
Referenced models: Create User — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Create User — response body |
Referenced models: Create User — response body
Schemas
Section titled “Schemas”526 more schemas are linked from the tables above, on the schema pages.
Create User — response body — @odata type, about Me, account Enabled, activities, adhoc Calls, age Group, agreement Acceptances, app Role Assignments, assigned Licenses, assigned Plans, authentication, authorization Info, birthday, business Phones, calendar, calendar Groups, calendar View, calendars, chats, city, cloud Clipboard, cloud P Cs, company Name, consent Provided For Minor, contact Folders, contacts, country, created Date Time, created Objects, creation Type, custom Security Attributes, data Security And Governance, department, device Enrollment Limit, device Management Troubleshooting Events, direct Reports, display Name, drive, drives, employee Experience, employee Hire Date, employee Id, employee Leave Date Time, employee Org Data, employee Type, events, extensions, external User State, external User State Change Date Time, fax Number, followed Sites, given Name, hire Date, identities, identity Parent Id, im Addresses, inference Classification, insights, interests, is Management Restricted, is Resource Account, job Title, joined Teams, last Password Change Date Time, legal Age Group Classification, license Assignment States, license Details, mail, mail Folders, mail Nickname, mailbox Settings, managed App Registrations, managed Devices, manager, member Of, messages, mobile Phone, my Site, notes, oauth2 Permission Grants, office Location, on Premises Distinguished Name, on Premises Domain Name, on Premises Extension Attributes, on Premises Immutable Id, on Premises Last Sync Date Time, on Premises Provisioning Errors, on Premises Sam Account Name, on Premises Security Identifier, on Premises Sync Behavior, on Premises Sync Enabled, on Premises User Principal Name, onenote, online Meetings, other Mails, outlook, owned Devices, owned Objects, password Policies, password Profile, past Projects, people, permission Grants, photo, photos, planner, postal Code, preferred Data Location, preferred Language, preferred Name, presence, print, provisioned Plans, proxy Addresses, registered Devices, responsibilities, schools, scoped Role Member Of, security Identifier, service Provisioning Errors, settings, show In Address List, sign In Activity, sign In Sessions Valid From Date Time, skills, solutions, sponsor Of, sponsors, state, street Address, surname, teamwork, todo, transitive Member Of, usage Location, user Principal Name, user Type custom Security Attributes @odata type
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
@odata.type | string | Optional |
Create User — response body — @odata type, about Me, account Enabled, activities, adhoc Calls, age Group, agreement Acceptances, app Role Assignments, assigned Licenses, assigned Plans, authentication, authorization Info, birthday, business Phones, calendar, calendar Groups, calendar View, calendars, chats, city, cloud Clipboard, cloud P Cs, company Name, consent Provided For Minor, contact Folders, contacts, country, created Date Time, created Objects, creation Type, custom Security Attributes, data Security And Governance, department, device Enrollment Limit, device Management Troubleshooting Events, direct Reports, display Name, drive, drives, employee Experience, employee Hire Date, employee Id, employee Leave Date Time, employee Org Data, employee Type, events, extensions, external User State, external User State Change Date Time, fax Number, followed Sites, given Name, hire Date, identities, identity Parent Id, im Addresses, inference Classification, insights, interests, is Management Restricted, is Resource Account, job Title, joined Teams, last Password Change Date Time, legal Age Group Classification, license Assignment States, license Details, mail, mail Folders, mail Nickname, mailbox Settings, managed App Registrations, managed Devices, manager, member Of, messages, mobile Phone, my Site, notes, oauth2 Permission Grants, office Location, on Premises Distinguished Name, on Premises Domain Name, on Premises Extension Attributes, on Premises Immutable Id, on Premises Last Sync Date Time, on Premises Provisioning Errors, on Premises Sam Account Name, on Premises Security Identifier, on Premises Sync Behavior, on Premises Sync Enabled, on Premises User Principal Name, onenote, online Meetings, other Mails, outlook, owned Devices, owned Objects, password Policies, password Profile, past Projects, people, permission Grants, photo, photos, planner, postal Code, preferred Data Location, preferred Language, preferred Name, presence, print, provisioned Plans, proxy Addresses, registered Devices, responsibilities, schools, scoped Role Member Of, security Identifier, service Provisioning Errors, settings, show In Address List, sign In Activity, sign In Sessions Valid From Date Time, skills, solutions, sponsor Of, sponsors, state, street Address, surname, teamwork, todo, transitive Member Of, usage Location, user Principal Name, user Type agreement Acceptances item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (allOf 1) | Model | All variants apply | Expand Get rule — response body — @odata type, id |
$ (allOf 2) | object | All variants apply | |
$ (allOf 2).@odata.type | string | Optional | |
$ (allOf 2).agreementFileId | JSON | Optional | |
$ (allOf 2).agreementFileId (anyOf 1) | string | Alternative | The identifier of the agreement file accepted by the user. |
$ (allOf 2).agreementFileId (anyOf 2) | null | Alternative | |
$ (allOf 2).agreementId | JSON | Optional | |
$ (allOf 2).agreementId (anyOf 1) | string | Alternative | The identifier of the agreement. |
$ (allOf 2).agreementId (anyOf 2) | null | Alternative | |
$ (allOf 2).deviceDisplayName | JSON | Optional | |
$ (allOf 2).deviceDisplayName (anyOf 1) | string | Alternative | The display name of the device used for accepting the agreement. |
$ (allOf 2).deviceDisplayName (anyOf 2) | null | Alternative | |
$ (allOf 2).deviceId | JSON | Optional | |
$ (allOf 2).deviceId (anyOf 1) | string | Alternative | The unique identifier of the device used for accepting the agreement. Supports $filter (eq) and eq for null values. |
$ (allOf 2).deviceId (anyOf 2) | null | Alternative | |
$ (allOf 2).deviceOSType | JSON | Optional | |
$ (allOf 2).deviceOSType (anyOf 1) | string | Alternative | The operating system used to accept the agreement. |
$ (allOf 2).deviceOSType (anyOf 2) | null | Alternative | |
$ (allOf 2).deviceOSVersion | JSON | Optional | |
$ (allOf 2).deviceOSVersion (anyOf 1) | string | Alternative | The operating system version of the device used to accept the agreement. |
$ (allOf 2).deviceOSVersion (anyOf 2) | null | Alternative | |
$ (allOf 2).expirationDateTime | JSON | Optional | |
$ (allOf 2).expirationDateTime (anyOf 1) | string | Alternative | The expiration date time of the acceptance. 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. Supports $filter (eq, ge, le) and eq for null values. Format: date-time Pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$ |
$ (allOf 2).expirationDateTime (anyOf 2) | null | Alternative | |
$ (allOf 2).recordedDateTime | JSON | Optional | |
$ (allOf 2).recordedDateTime (anyOf 1) | string | Alternative | 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. Format: date-time Pattern: ^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?(Z|[+-][0-9][0-9]:[0-9][0-9])$ |
$ (allOf 2).recordedDateTime (anyOf 2) | null | Alternative | |
$ (allOf 2).state | JSON | Optional | The state of the agreement acceptance. The possible values are: accepted, declined. Supports $filter (eq). |
$ (allOf 2).state (anyOf 1) | string | Alternative | Known values: accepted, declined, unknownFutureValue |
$ (allOf 2).state (anyOf 2) | JSON | Alternative | |
$ (allOf 2).state (anyOf 2) (anyOf 1) | object | Alternative | |
$ (allOf 2).state (anyOf 2) (anyOf 2) | null | Alternative | |
$ (allOf 2).userDisplayName | JSON | Optional | |
$ (allOf 2).userDisplayName (anyOf 1) | string | Alternative | Display name of the user when the acceptance was recorded. |
$ (allOf 2).userDisplayName (anyOf 2) | null | Alternative | |
$ (allOf 2).userEmail | JSON | Optional | |
$ (allOf 2).userEmail (anyOf 1) | string | Alternative | Email of the user when the acceptance was recorded. |
$ (allOf 2).userEmail (anyOf 2) | null | Alternative | |
$ (allOf 2).userId | JSON | Optional | |
$ (allOf 2).userId (anyOf 1) | string | Alternative | The identifier of the user who accepted the agreement. Supports $filter (eq). |
$ (allOf 2).userId (anyOf 2) | null | Alternative | |
$ (allOf 2).userPrincipalName | JSON | Optional | |
$ (allOf 2).userPrincipalName (anyOf 1) | string | Alternative | UPN of the user when the acceptance was recorded. |
$ (allOf 2).userPrincipalName (anyOf 2) | null | Alternative |
Referenced models: Get rule — response body — @odata type, id
Create User — response body — @odata type, about Me, account Enabled, activities, adhoc Calls, age Group, agreement Acceptances, app Role Assignments, assigned Licenses, assigned Plans, authentication, authorization Info, birthday, business Phones, calendar, calendar Groups, calendar View, calendars, chats, city, cloud Clipboard, cloud P Cs, company Name, consent Provided For Minor, contact Folders, contacts, country, created Date Time, created Objects, creation Type, custom Security Attributes, data Security And Governance, department, device Enrollment Limit, device Management Troubleshooting Events, direct Reports, display Name, drive, drives, employee Experience, employee Hire Date, employee Id, employee Leave Date Time, employee Org Data, employee Type, events, extensions, external User State, external User State Change Date Time, fax Number, followed Sites, given Name, hire Date, identities, identity Parent Id, im Addresses, inference Classification, insights, interests, is Management Restricted, is Resource Account, job Title, joined Teams, last Password Change Date Time, legal Age Group Classification, license Assignment States, license Details, mail, mail Folders, mail Nickname, mailbox Settings, managed App Registrations, managed Devices, manager, member Of, messages, mobile Phone, my Site, notes, oauth2 Permission Grants, office Location, on Premises Distinguished Name, on Premises Domain Name, on Premises Extension Attributes, on Premises Immutable Id, on Premises Last Sync Date Time, on Premises Provisioning Errors, on Premises Sam Account Name, on Premises Security Identifier, on Premises Sync Behavior, on Premises Sync Enabled, on Premises User Principal Name, onenote, online Meetings, other Mails, outlook, owned Devices, owned Objects, password Policies, password Profile, past Projects, people, permission Grants, photo, photos, planner, postal Code, preferred Data Location, preferred Language, preferred Name, presence, print, provisioned Plans, proxy Addresses, registered Devices, responsibilities, schools, scoped Role Member Of, security Identifier, service Provisioning Errors, settings, show In Address List, sign In Activity, sign In Sessions Valid From Date Time, skills, solutions, sponsor Of, sponsors, state, street Address, surname, teamwork, todo, transitive Member Of, usage Location, user Principal Name, user Type authorization Info @odata type, certificate User Ids
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
@odata.type | string | Optional | |
certificateUserIds | array | Optional | |
certificateUserIds[] | JSON | Each item | |
certificateUserIds[] (anyOf 1) | string | Alternative | |
certificateUserIds[] (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: microsoft.me_user_updateuser. Catalog operation: me_user_updateuser. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Refused by default. This operation leaves the caller holding a credential (the signed-in user’s new password, when the caller sets one in passwordProfile; only when the request sets passwordProfile.password), so Alter refuses it on every connection with credential_minting_refused unless an organization admin allows it: a credential_minting rule naming provider microsoft and operation microsoft.me_user_updateuser (or me_user_updateuser). See Allow an operation that hands over a credential.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.