Import Users into Project


This tutorial will demonstrate how to add users to a Project from a CSV file. This tutorial is accompanied by a sample powershell script located here. Authorization is provided as a separate script.


Skill level:



5 minutes


This tutorial assumes that you already have:

  • PowerShell (Recommended 7.0+ version) installed.
  • Access to, or create a new, project to use this sample.
  • Your own Desktop/Mobile application/client registered on iTwin Platform.
    • Steps to follow for registering an application can be found here.
    • Make sure that your application/client is associated with Projects API and has projects:read and projects:modify scopes enabled.

1. Request access token for use in Authorization header

Authorization is required for all iTwin Platform API endpoints. See the Authorization README for more information. This tutorial powershell sample already includes code that obtains an authorization token.

These samples require an Authorization Code + PKCE client. Registration of a Desktop/Mobile application/client will give you an Authorization Code + PKCE client.

2. Read users from CSV

Reading users from a CSV is dependent upon your particular development framework and is outside the scope of this tutorial.

Users CSV file must be in following format:

Email: Roles <comma-separated list of project roles> <comma-separated list of project roles>

3. Add each user to the Project

Adding a team member to a project requires POSTing the request to the{id}/members endpoint.

Two headers are required. An authorization header is needed.

Authorization: Bearer JWT_TOKEN
Content-Type: application/json

Example HTTP request

Authorization: Bearer JWT_TOKEN
Content-Type: application/json

The request body is specified as JSON and requires the email and roleNames properties. The API works with one user at a time, thus one email. Multiple roles may be requested via the roleNames array.

Example request body

    "Project Role 1",
    "Project Role 2"

More resources that you may like

Manage the users, projects, and organizations that interact with your iTwin.
An overview and detailed Projects API documentation.
PowerShell samples demonstrating API endpoints.