Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unauthorized error (401) while making a REST call to get stack/repository version details - Azure HDI(HDP cluster)

Highlighted

Unauthorized error (401) while making a REST call to get stack/repository version details - Azure HDI(HDP cluster)

New Contributor

Hi @jsensharma

I'm using Azure HDInsight cluster(which uses HDP binaries internally).

I have a use-case where I need to make a REST API for getting the stack/repository version details from Ambari.


http://IP-Address:8080/api/v1/clusters/CLUSTERNAME/stack_versions/1/repository_versions/1


If I hit the above endpoint URL with admin as username which is cluster admin. I'm able to get the expected response(200).


But with Azure AD users , It throws 401(unauthorized) error. If I hit with https://clustername/api/v1/cluster/.


I'm able to get response. It fails for http://


Any suggestions on why this REST call fails with AD users?


1 REPLY 1

Re: Unauthorized error (401) while making a REST call to get stack/repository version details - Azure HDI(HDP cluster)

Super Mentor

@Arunjunai Sathis

Please make sure that you have Synced the AD users to Ambari DB? As mentioned in the following link:

# ambari-server sync-ldap [option]


https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.2/bk_ambari-security/content/synchronizing_ld...

.


Also please check the Role which you have assigned to the AD user if that user roles is allowed to make API calls.
https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.2/bk_ambari-administration/content/cluster_ro...

.