Error with api call to modify ntp settings on Unity
Using Ansible uri module to make api call to Unity and getting a 401 unauthorized response, however, the user I'm using is an admin. Here are the headers I'm sending which includes a token from a prior task. Anything I'm missing or another reason why it would come back and say it's not authorized?
Looking at your error that you posted it is stating that there is an issue with the account that you are using.I would double check your user name and password to ensure that it was entered correctly.
This server could not verify that you\nare authorized to access the document\nrequested. Either you supplied the wrong\ncredentials (e.g., bad password), or your\nbrowser doesn't understand how to supply\nthe credentials required.
@DELL-Sam L -- the user I'm using is an ldap user which is an admin on the array. Are there other permissions needed? From what I can see, this boils down to what headers is the unity api expecting when the authentication is happening for a POST call. In the previous task, I am successfully authenticating using basic auth and getting the EMC-CSRF-TOKEN which i'm adding as a header in the subsequent POST call, however, it seems the api is expecting something different. So, if we can answer the question around what headers the api is expecting, that would probably solve it as it seems to be redirecting the call to /cas/login currently.
DELL-Sam L
Community Manager
•
8056 Posts
•
34380 Points
777
0
Posted June 6th, 2022 16:00
Hello travelerdb,
Which unity system do you have and what is your current OE?