You can add users and assign privileges to them in Virtual Private Cloud OnDemand.

The company attribute is present in the OAuth token vCloud Air that sends as a part of the Authorization header. The new user is created using the company value of the administrator who logged in to create the user.

You have signed up and registered for Virtual Private Cloud OnDemand and received an email with a user name and password for an Account Administrator.

Using the URL in the confirmation email, you have logged in to Virtual Private Cloud OnDemand using the Web UI, set your password, and accepted the Terms of Service.

You have logged in as an administrator using the /api/iam/login API and received an OAuth token. See Log In and Receive Access Token for information.

Issue a request to create a user for your account:

POST https://vca.vmware.com/api/iam/Users

In the request, include the OAuth token and the Accept header:

Accept: application/json;version=5.7
Authorization: Bearer OAuth_token

Include the following elements in the request body:

Required Elements to Create a User

Element

Description

state

State of the user—active or inactive

email

Email address for the user

Note

The userName and email attributes must contain the same values.

familyName

Family name or last name for the user

givenName

First name of the user

roles

The roles to which the user is assigned

name

Name of the roles assigned to the user

You can assign a user to the following roles:

Account Administrator

Virtual Infrastructure Administrator

Network Administrator

Read-Only Administrator

End User

The roles are mutually exclusive with the exception of the Network Administrator and Virtual Infrastructure Administrator roles; meaning, you can assign a user to the Network Administrator and Virtual Infrastructure Administrator roles, or the Account Administrator, Read-Only Administrator, or End User role.

For information about the rights available for each predefined role in vCloud Air, see Role-based User Account Management in the vCloud Air Virtual Private Cloud OnDemand User's Guide.

userName

Name of the user in email format

Note

The userName and email attributes must contain the same values.

Request Header – Add user

POST https://vca.vmware.com/api/iam/Users
Accept: application/json;version=5.7
Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJqdGkiOiJiN2VjNjUyZi1mZmUzLTRh…

Request Body – Add user

{
    "schemas": [
        "urn:scim:schemas:core:1.0"
    ],
    "state": "Active",
    "email": "test12345@sample.com",
    "familyName": "test12345",
    "givenName": "Jill",
    "roles": {
        "roles": [
            {
                "name": "End User"
            }
        ]
    },
    "userName": "test12345@iamtest2242014.com"
}

Response – Add user

Header:
Status: 201 CREATED
Body:
{
    "meta": {
        "created": 1400665149048,
        "modified": 1400665149048
    },
    "schemas": [
        "urn:scim:schemas:core:1.0"
    ],
    "state": "Active",
    "id": "7179ba2e-6d49-485f-b54e-16e3b8ea3058",
    "companyId": "422ca48d-a8e6-4b71-9f8f-5aa78362f98e",
    "customerNumber": null,
    "email": "test12345@sample.com",
    "familyName": "test12345",
    "givenName": "Jill",
    "roles": {
        "roles": [
            {
                "description": "Allows creation and management of VMs.",
                "name": "End User",
                "id": "6"
            }
        ]
    },
    "serviceGroupIds": {
        "serviceGroupIds": []
    },
    "tosAcceptDate": null,
    "tosAccepted": false,
    "userName": "test12345@iamtest2242014.com"
}