Working with User Permissions

Introduction

This tutorial walks you through the process of using the Procore API to change a project user’s permission template. In order to update a project user’s permission template through the API, the user must be first removed from the project and then re-added with the new permission template ID.

Tutorial Prerequisites

To successfully complete this tutorial, you must have Admin permissions on the company level Directory tool.

Step 1 - Find the user whose permission template will be changed

Using either the List Project Users or Show Project User endpoint, find the object associated with the user whose permission template you would like to change. The important values to note are the user’s ID and the permission_template object (if applicable).

User Permissions - 01

Step 2 - Removing the User from a Project

In order to change a user's permission template on a project, it is necessary to remove them and then re-add them to the same project. Performing this action will not delete or reassign any content from this user.

With the ID of the user you wish to change a project template for, use the Remove a User from the Project endpoint (DELETE /vapid/projects/{project_id}/users/{id}/actions/remove) to remove the given user from a specific project.

User Permissions - 02

The successful removal of the user from this project will be indicated by a 204 No Content HTTP status code (with an empty response body). This endpoint will remove a user from the given project, but not remove them from the company level directory.

Step 3 - Re-add the User to the Project

Using the Add Company User to Project endpoint, you can re-add the user to the project with the new permission_template_id. A successful request will be indicated by a 201 Created HTTP response code.

User Permissions - 03

You can confirm the change of the permission template by making a request to the List Project Users endpoint, finding the object associated with the user whose permission template you were updating, and noticing the new permission template ID and name values.

User Permissions - 04