Skip to main content
(v2) Creating JSON file for user import
Reg Gray avatar
Written by Reg Gray
Updated over a week ago

Creating JSON file for user import

WHEN

For those customers where access to users and relationship isn't available in the Active Directory for Planner, the data can come from any other data source if formatted in the JSON format defined below.

WHY

Some customers does not have all users and their group membership reflected in an MS Active Directory, but in another structure/system that holds the security principals of user and groups.

Steps

  1. Configure Planner with locations - and if required VIP groups and departments

  2. Create a User Import definition, as "Import Set", within administration->Settings->Import Users

  3. Create your JSON file of users - MUST be named exactly "ImportSet.txt"

  4. Contact [email protected] for a powershell script that you can use to import the users into your solution.

HOW TO CREATE JSON FILE FOR IMPORT

User, roles and department membership must be defined in a specific JSON form - which consists of attribute-data pairs. These are described in the table below.

The import file must include all users that are to be available in Planner.

Note! Whenever the file is update - it will add/update/delete as follows:

  • New users will be added to Planner

  • Update users will be updated in Planner

  • Missing users, imported during an earlier import, will be delete in Planner

Here is an example of a user object and the attribute-data pairs that is must contain:

[{

"GlobalRoles": [0],

"LocalRoles": [0],

"VipRoleMemberships": [],

"DepartmentUserMemberships": [],

"DepartmentSecretaryMemberships": [],

"InvalidReason": null,

"DataSourceGuid": "",

"Login": "[email protected]",

"Lastname": "Jurgensen",

"Firstname": "Peter W.",

"Initial": "pj",

"Email": "[email protected]",

"LegacyExchangeDN": null,

"Phone": null,

"MobilePhone": null,

"LocationId": 3,

"Department": "IT Department",

"BillingNote": "",

"MeetingTypeNote": null

}]

Attribute-data Pairs

GlobalRoles

Empty array or array of number(s) referring to role enums

Global role(s) for user

UserRoleType {Booker = 0, FacilityManager = 1, CateringManager = 2, Secretary = 3, Administrator = 5, Receptionist = 6,}

Ex. "GlobalRoles": [0]
User is a global booker

LocalRoles


Array of number(s) referring to one or more role enums

Local role(s) for user

UserRoleType {Booker = 0, FacilityManager = 1, CateringManager = 2, Secretary = 3, Administrator = 5, Receptionist = 6,};

Ex"LocalRoles": [0,2]
User is local booker and local catering manager, for the location defined in LocationId

VipRoleMemberships

Empty array or array of number(s) referring to usergroup_id for VIP groups

VIP groups for user

Reference to membership of usergroup_id - these can be looked up in database or by hovering in administration

Ex. "VipRoleMemberships": [234,43]
User is a member of the usergroup with ID 234 and with ID 43

Ex. "VipRoleMemberships": []
User is not a member of any VIP group

DepartmentUserMemberships

Empty array or array of number(s) referring to usergroup_id for VIP groups

Reference to membership to departments

Reference to membership of department ID - these can be looked up in database or by hovering in administration for each department

Ex. "DepartmentUserMemberships": [234,43]
User is a member of department with ID 234 and with ID 43

Ex. "DepartmentUserMemberships": []
User is not a member of any departments

DepartmentSecretaryMemberships

Empty array or array of number(s) referring to usergroup_id for VIP groups

Reference to membership to department.id which the user is a secretary of

Reference to membership of department ID - these can be looked up in database or by hovering in administration for each department

Ex. "DepartmentSecretaryMemberships": [234,43]
User is secretary for department with ID 234 and with ID 43

Ex. "DepartmentSecretaryMemberships": []
User is not secretary for any department

InvalidResource

null

DataSourceGuid

"GUID"

A unique identifier per user from the source system. If this is not set, a user that is deleted will not be recoverable when reintroduced in the import set, and will then appear as a new user in Planner.

Login

text

User login
If used with SSO - then it must match the claim used in the ADFS/AAD
Text field

Lastname

text

Must be set

Ex. "Lastname": "Hansen"

Firstname

text

Must be set

Ex. "Firstname": "Kasper"

Initial

text

Must be set

Ex. "Initial": "KU"

Email

text

Must be set, and must be unique pr user

Ex. "Email":"[email protected]"

LegacyExchangeDN

Null or text

Phone

Null or text

Phone for user

Ex. "Phone":"123445",

or

Ex. "Phone": null,

MobilePhone

Null or text

Mobile phone for user

Ex. "MobilePhone":"123123"

or

Ex. "MobilePhone": null,

LocationId

number

Reference to location for user

Department

text

Department text - just text no reference

Ex. "Department": "My department"

or

Ex. "Department": ""

BillingNote

text

Billing/Costcenter note - jut text no reference

Ex. "BillingNote": "xyz-123"

or

Ex. "BillingNote": ""

MeetingTypeNote

text

Meeting Type note - jut text no reference

Ex. "MeetingTypeNote": "abc-234"

or

Ex. "MeetingTypeNote": ""

Did this answer your question?