Hello everyone,
I've installed a VSCA embedded 6.5 on a esxi HPE 6.5 host.
I've configured SSO, ESXi and vCenter to use domain example.com.
I can logging in every web interface and do every action with my domain account user@example.
However i'm trying to use Hashicorp Terraform to manage my infrastructure. Terraform use vCenter api. It cannot logging with user@example.com (or any account by the way) and give the message :
err: Error connecting to CIS REST endpoint: Login failed: body: {"type":"com.vmware.vapi.std.errors.unauthenticated","value":{"messages":[{"args":[],"default_message":"This method requires authentication.","id":"vapi.method.authentication.required"}]}}, status: 401 Unauthorized
I've tried to use vCenter AI directly with this :
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -k --header 'vmware-use-header-authn: test' --header 'vmware-api-session-id: null' -u 'user@example.com:password' 'https://vcenter-test.example.com/rest/com/vmware/cis/session'
It returns this error :
{"type":"com.vmware.vapi.std.errors.unauthenticated","value":{"messages":[{"args":[],"default_message":"Authentication required.","id":"com.vmware.vapi.endpoint.method.authentication.required"}]}}
I've obviously something wrong with permissions, but i cannot figure what it is.
Does someone have an idea please ? I'm kinda stuck.
Kind regards,
Hello there,
is this the correct username format to login using this script?
Does is work using "DOMAIN\username" instead of "username@domain"?
Just a quick thought.
Best regards
No it doesn't work either.