Authenticating to the VCF Operations API with vIDM Credentials
- Brock Peterson

- Apr 30
- 2 min read
We've discussed authenticating with the VCF Operations API a few times before:
I'd like to explore what this looks like when using vIDM credentials. First, you must configure vIDM as an Authentication Source, which we've also discussed previously. All screenshots here were taken from VCF Operations 8.18.1 and vIDM 3.3.7.
Once vIDM has been configured as an Authentication Source, you must ingest the users you want via Administration - Control Panel - User Accounts

Select Import from Source and select your user.

Click NEXT and add it to whatever Groups are available, in this case I have an Administrator Group with administrative permissions.

Once done you'll see your new user.

To confirm your new userid works, I confirmed I could login.

Clicking REDIRECT sends you to the vIDM login.

Provide your credentials (notice I'm using the System Domain) and click Sign In.

Ok, we created our vIDM Authentication Source, imported a vIDM user, and proved we could log into the UI. But how do we authenticate with the Operations API using that same credential? Here's how!

A couple things to note here:
Username is your userid@vIDM Domain, in my case brockp@System Domain
Auth Source is the display name of your vIDM Authentication Source, whatever you've named it upon creation
Another way to authenticate is via POST /api/auth/token/acquire, which looks like this.

This provides you with a token you can use for subsequent calls. The cURL looks like this.
curl -X POST "https://192.168.135.126/suite-api/api/auth/token/acquire?_no_links=true" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-d "{
\"username\" : \"brockp@System Domain\",
\"authSource\" : \"vIDM\",
\"password\" : \"yourpasswordgoeshere\"
}"
You can now run all the API calls you'd like with your vIDM credential. Hope this was helpful, enjoy!
Comments