Add New Users

You can add one or more users to a provider or customer organization and assign organizational and service roles to them by using the user management API.

Prerequisites

  • You have the Provider Administrator, Provider Operations Administrator, Provider Account Administrator, or Customer Administrator role in your VMware Cloud Partner Navigator organization.
  • Obtain an access token from the organization you want to manage and set it as the csp-auth-token request header. See Using VMware Cloud Partner Navigator APIs.
  • Set the Content-Type header of this request to application/json.

Procedure

  1. In the body of the request, enter the values of the required parameters for adding a user.
    {
        "serviceRolesItems": [
            {
                "serviceId": "",
                "roleNamesToAdd": []
            }
        ],
        "orgRolesToAdd": [],
        "users": [
            {
                "username": "",
                "idpId": ""
            }
        ]
    }

    You can include more than one role in the roleNamesToAdd and orgRolesToAdd parameters.

    If you are adding a user with the Provider Account Administrator role, enter the IDs of the customer organizations manageable by the user in the orgRoleBindingOrgs parameter.

    For a list of API values of the organizational and service roles in VMware Cloud Partner Navigator, see VMware Cloud Partner Navigator API Request Parameters.

  2. (Optional) If you want to add multiple users at the same time, insert an extra array of username and idpId for each user, within the users parameter.
    {
        "users": [
            ...
            {
                "username": "",
                "idpId": ""
            },
            {
                "username": "",
                "idpId": ""
            }
            ...
        ],
    }
    The roles that you enter are assigned to all users.
  3. To add new users, enter the ID of the organization that you want the users added to, and run the POST request.
    POST https://console.navigator.vmware.com/cphub/api/auth/v1/orgs/org_ID/add-users

Results

If a user has VMware ID set up with their email, they are immediately added to your organization. If a user does not have VMware ID set up with their email, they receive an invitation to create a VMware ID and join your organization. You receive a response confirming the operation. Pending invitations expire after seven days.

Example: Add a New User to an Organization

This example adds a user with the Provider Support User role to a provider organization.

Enter the details and organizational role of the user.

{
    "serviceRolesItems": [
        {
            "serviceId": "I8_vUYLiPxopN_YFGqhgbH6rrAI_",
            "roleNamesToAdd": [
                "log-intelligence:user"
            ]
        }
    ],
    "orgRolesToAdd": [
        "msp:provider_account_admin"
    ],
    "users": [
        {
            "username": "[email protected]",
            "idpId": ""
        }
    ]
}

Add the new user.

PATCH https://console.navigator.vmware.com/cphub/api/auth/v1/orgs/62aad261-0c59-4d50-9725-3848afd5b1dd/add-users

The response returns information about the added user.

{
    "message": "Users have been added/invited successfully",
    "addedUsers": {
        "users": [
            "[email protected]"
        ],
        "status": "SUCCESS",
        "failedUsers": [],
        "detailedStatus": {
            "[email protected]": "Success"
        }
    }
}

What to do next

You can fetch a list of pending invitations, revoke invitations sent by mistake, or resend expired invitations by using the User Management API.