Managing Users
User components cover the whole account lifecycle, from creating someone to shutting their access down. Most onboarding and offboarding flows are built almost entirely from this page.
List Users
Returns users from the tenant. Accepts an OData filter, for example to return only disabled accounts, and has an After setting that limits the result to accounts created after a given date.
On large tenants, compare the returned count against the number you expect before building logic on top of the result.
Get User
Returns a single user. Accepts either the object ID or the user principal name in email format, so you do not need to look up an ID first.
Add User
Creates an account. This is the anchor component of any onboarding flow.
Required are the user principal name, the display name and the mail nickname. Optional fields cover department, job title, address and joining or leaving dates. Two inputs deserve attention:
Usage Location is a two-letter country code. It is optional here but mandatory before any license can be assigned, so set it now rather than repairing it later.
Manager ID assigns the line manager during creation, which saves a separate step.
Update User
Updates an existing account. Setting the account to disabled also runs through this component, which is why it appears in offboarding flows as well as in maintenance.
Delete User
Deletes an account. Microsoft keeps it in the recycle bin for 30 days, where Restore Deleted Item can bring it back. After that it is gone.
Reset User Password
Resets a password. You can supply your own or have one generated, set the length, and require a change at next sign-in. The component returns the password that was set.
Revoke User Sessions
Invalidates all active sign-in sessions and refresh tokens for a user.
This belongs next to every account-disable step. Disabling an account does not end sessions that are already running, so on its own it leaves a window open.
Set User Manager and Get User Manager
Write and read the line manager relationship of a user.
Invite Guest
Invites an external person as a B2B guest. You supply the email address and can optionally set a display name, a target URL, a custom message, and whether Microsoft sends the invitation mail.
The response includes the redemption URL, so you can also distribute the invitation through your own channel instead.
Trigger: New User
Fires when a new account has been created. This is a polling trigger, and it can be limited to accounts created after a given start date.
Was this helpful?