Recovering access to projects
When a user creates a project, they are automatically added to the project as an Administrator. If the user leaves the company without adding another user as an Administrator, you cannot complete tasks such as managing project collaborators, removing assets from projects, and stopping all active runtimes.
Any users who are Editors or Viewers in the project continue to have access to this project.
You can recover access to the projects that do not have an active Administrator by adding yourself as a project Administrator.
Prerequisites
- Go to and make sure you have the Manage projects permissions. You can add and edit permissions from the Roles tab on the Access control page.
- You must have an authorization token. For more information, see Generating an API authorization token.
Resolving the problem
- Run the following command to obtain your UID. Copy and save your UID from the response so you
can use it in a following step.
Ensure that you replace the following values:
- Replace <hostname> with the correct value.
- Generate an authorization token. For more information, see Generating an API authorization token.
curl -k -X GET \ https://<hostname>/usermgmt/v1/user/currentUserInfo \ -H 'Authorization: Bearer ${TOKEN}'For example, the UID from the following response is1000331001.{ "uid": "1000331001", "user_name": "username", "display_name": "display_name", "email": "name@example.com", "role": "Admin", ... } - Find all of the projects that were created by the user who left the company by running the
following command.
Ensure that you replace the following values:
- Replace <hostname> with the correct value.
- Replace <admin_username> with the username of the user who left the company.
curl -k -X GET \ https://<hostname>/v2/projects?member=<admin_username>&limit=100 \ -H 'Authorization: Bearer ${TOKEN}' --output project-list.jsonThis curl command creates a
project-list.jsonfile that contains the response. - Review the JSON file to identify the Project ID (GUID) of the project you are trying to
recover.
For example, the Project ID (GUID) from the following response is
46a19524-bfbf-4810-a1f0-b131f12bc773.{ "metadata": { "guid": "46a19524-bfbf-4810-a1f0-b131f12bc773", "url": "/v2/projects/46a19524-bfbf-4810-a1f0-b131f12bc773", "created_at": "2019-03-05T23:15:36.175Z", "updated_at": "2019-10-02T19:26:49.684Z" }, "entity": { "name": "Project Name", "description": "A project description.", - Add yourself as an Administrator on the project. Ensure that you replace the following values:
- Replace <hostname> with the correct value.
- Replace <username> with your username.
- Replace <uid> with your UID.
curl -kiv -X POST \ https://<hostname>/v2/projects/<guid>/members \ -H 'Authorization: Bearer ${TOKEN}' -H 'Content-Type: application/json' \ -d '{ "members": [ { "user_name": "<username>", "id": "<uid>", "role": "admin" }] }'
You can now access projects that were created by the user who has left the company and manage them using the Administrator role.