How to Obtain an Authentication Token for VMware Aria Operations (formerly known as vROps) Using REST API Through the vIDM Source
search cancel

How to Obtain an Authentication Token for VMware Aria Operations (formerly known as vROps) Using REST API Through the vIDM Source

book

Article ID: 389225

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

This guide explains how to obtain an authentication token for VMware Aria Operations (formerly known as vROps) via the vIDM authentication source using the REST API. The API call uses the following endpoint:

POST: https://<Hostname_or_IP>/suite-api/api/auth/token/acquire

Note: Ensure that you replace <Hostname_or_IP> with the actual hostname or IP address of your VMware Aria Operations instance.

Environment

VMware Aria Operations (formerly vRealize Operations) 8.x.
VMware Identity Manager 3.3.7cancel

Cause

The request payload for acquiring an authentication token differs when using vIDM as the authentication source.

If users attempt authentication with non vIDM username format, they will receive a 401 Unauthorized error.

Example Body Payload:

{
"username" : "vidm-domain\user" or "vidm-user" or "vidm-domain@user" or "user\vidm-domain"
"password" : "password",
}

Resolution

Below are details for making the API request correctly.

URL/Method:

POST: https://<Hostname_or_IP>/suite-api/api/auth/token/acquire

Note: Ensure that you replace <Hostname_or_IP> with the actual hostname or IP address of your VMware Aria Operations instance.

Headers:
Content-Type: application/json
Accept: application/json

Body Payload:
{
"username" : "vIDM_Username@vIDM_DOMAIN@vIDM_AUTHENTICATION_SOURCE_NAME_IN_vROPS", (e.g: [email protected]@vIDM)
"password" : "The password above must be of vIDM user (the one user enters to login to vIDM server)"
}

Sample Response:
{
"token": "xxxxxxxxxxx",
"validity": xxxxxxxx,
"expiresAt": "xxxxxx",
"roles": []
}

In above example the username has three parts:

1) username: [email protected]
2) domain name: yyy.com
3) The name of vIDM auth source in vRops (see Administration->Authentication Sources)

Note: If you are using local vIDM user you still have to specify the domain name, for example: admin@System Domain@vIDM-1, where the username is "admin", domain is "System Domain" (this is seen in vIDM server's UI) and auth-source is "whatever is the name of vIDM auth source in Aria Operations Administration->Authentication Sources page".