Create user
BetaChanges data
Creates a work account in your Microsoft 365 directory, with a first password.
Settings
| Setting | What it is |
|---|---|
| ConnectionRequired | The Microsoft Graph connection the step signs in with. |
| Display nameRequired | text |
| Sign-in addressRequired | alias@domain — the domain must be one your tenant has verified. |
| Mail aliasRequired | The part of their mail address before the @. |
| First passwordRequired | Never printed, never logged. It must meet your tenant's password policy. |
| Change password at first sign-in | true/false |
| Can sign in | Off creates the account blocked from signing in. |
| First name | text |
| Last name | text |
| Job title | text |
| Department | text |
| Usage location | A two-letter country code, e.g. NL. A licence can only be assigned once it is set. |
Technical details
| Key | Value |
|---|---|
connection | texta connection id from `requires.connections` (provider `microsoft-graph`) |
displayName | text |
userPrincipalName | text |
mailNickname | text |
auth.password | textwrite `{{ secret.NAME }}`, never the value |
forceChangePasswordNextSignIn | true/false, by default true |
accountEnabled | true/false, by default true |
givenName | text |
surname | text |
jobTitle | text |
department | text |
usageLocation | text |
Output
| Field | Type |
|---|---|
idUser id | string |
userPrincipalNameSign-in address | string |
user | object |
user.displayName | string |
Sample output, and the expression for each field
- id"1"
- user
- displayName"Adele Vance"
- id"1"
- userPrincipalName"adele@contoso.com"
- userPrincipalName"adele@contoso.com"
Errors
When a step of this node stops a run, the run page shows a code. Look it up:
Example step
The step as a flow file holds it. Replace each value in <…>.
{
"config": {
"accountEnabled": true,
"auth": {
"password": "<first password>"
},
"connection": "<connection id>",
"department": "",
"displayName": "<display name>",
"forceChangePasswordNextSignIn": true,
"givenName": "",
"jobTitle": "",
"mailNickname": "<mail alias>",
"surname": "",
"usageLocation": "",
"userPrincipalName": "<sign-in address>"
},
"label": "Create user",
"type": "graph.createUser",
"version": 1
}