You need to programmatically retrieve the shared secret for an existing OAuth2 client ID in VMware Identity Manager (VIDM). Currently, you might be obtaining the shared secret manually through the UI (Administration Console > Catalog > Settings > Remote App Access) and require the equivalent API method to automate this workflow.
VMware Identity Manager 3.3.7
You have an administrative requirement to query and extract OAuth2 client configurations and secrets programmatically rather than navigating through the graphical user interface.
To retrieve the shared secret using the REST API, perform the following steps:
Authenticate to your environment and obtain an OAuth2 Bearer token that possesses the admin scope.
Execute an HTTP GET request targeting the following OAuth2 Client Management API endpoint: https://<hostname>/SAAS/jersey/manager/api/oauth2clients/{id}
Replace {id} in the URI with the specific clientId of your target client.
Supply the retrieved Bearer token within the Authorization header of the request.
Parse the returned JSON response body. The shared secret string is located within the secret key.