Active Directory authorization header

Content Platform Tenant Management Help

File Size
4269 KB
Part Number

You use the HTTP Authorization request header to provide the authentication token for an AD user accessing HCP through the management API. The value of this header is AD followed by the authentication token, in this format:

Authorization: AD authentication-token

For example, here’s the Authorization header for a user named lgreen and password p4ssw0rd:

Authorization: AD

Specifying the Authorization header with cURL

With cURL, you use the -H option to specify a header. So, for example, a request to list the tenants for the HCP system named might look like this:

curl -i -k -H "Authorization: AD"
    "Accept: application/xml" ""

Specifying the authentication header in Python with PycURL

Tip: After you log in using the authorization AD header, the response header replies with an hcap Set-Cookie value. You can use this cookie for subsequent authentication requests instead of using the authoriation AD header. For example:
curl -ik  -b HCAP-Login="acmepKMUfWLEu" 

In Python with PycURL, you use the HTTPHEADER option to specify a header, as in this example:

curl.setopt(pycurl.HTTPHEADER, ["Authorization: AD"])