FlowmageDocs

Create user

BetaChanges data

Creates a work account in your Microsoft 365 directory, with a first password.

Settings

SettingWhat it is
ConnectionRequiredThe Microsoft Graph connection the step signs in with.
Display nameRequiredtext
Sign-in addressRequiredalias@domain — the domain must be one your tenant has verified.
Mail aliasRequiredThe part of their mail address before the @.
First passwordRequiredNever printed, never logged. It must meet your tenant's password policy.
Change password at first sign-intrue/false
Can sign inOff creates the account blocked from signing in.
First nametext
Last nametext
Job titletext
Departmenttext
Usage locationA two-letter country code, e.g. NL. A licence can only be assigned once it is set.
Technical details
KeyValue
connectiontexta connection id from `requires.connections` (provider `microsoft-graph`)
displayNametext
userPrincipalNametext
mailNicknametext
auth.passwordtextwrite `{{ secret.NAME }}`, never the value
forceChangePasswordNextSignIntrue/false, by default true
accountEnabledtrue/false, by default true
givenNametext
surnametext
jobTitletext
departmenttext
usageLocationtext

Output

FieldType
idUser idstring
userPrincipalNameSign-in addressstring
userobject
user.displayNamestring
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
}