vRO REST API authorization using Oauth2.0 Authentication
search cancel

vRO REST API authorization using Oauth2.0 Authentication

book

Article ID: 337264

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

This article helps the vRO user in authorizing vRO REST API using Oauth2.0 Authentication.


Resolution

To authorize vRO REST API using Oauth2.0 Authentication:

  1. Make a POST request to this URL:

    https://HOST/SAAS/t/TENANT/auth/oauthtoken?grant_type=password

    Note: Replace HOST and TENANT with corresponding values from environment

  2. Select application/x-www-form-urlencoded for Content-Type header.

  3. Use this body format with POST request:

    username=<USERNAME<EM>>&password=<PASSWORD>&client_id=<CLIENT_ID>&domain=<USER_DOMAIN>

    Note:
    • Replace the <HOST>, <TENANT>, <USERNAME> and <PASSWORD> with the respective values.
    • <USERNAME> must be entered the same way it is entered on the login page.
    • The <DOMAIN> is the fully qualified name of the domain of the user. It can be find by navigating through vRA UI Administration > Users & Groups > Directory Users and Groups.
    • The <CLIENT_ID> can be found in /etc/vcac/solution-users.properties. For this request to work you will need the cafe_cli client. Following script should print it in the console:

      (grep -i cafe_cli= /etc/vcac/solution-users.properties | sed -e 's/cafe_cli=//')