07/28/2022 10:33 AM
I have a service user let's say apiuser and I need to give it Saviynt API access.
As an admin, I tried resetting the password from UI via Admin->Admin Functions->Admin Functions
The password set here if used in API throws 401 unauthorized.
Note: Our environment is SSO enabled, so I can't log in via the direct link to log in with the password set and then change the API password from the UI option.
Anyone faced a similar issue and how did you manage to set the API password as self-service instead of reaching out to Saviynt to do it from the backend?
-Siva
Solved! Go to Solution.
07/29/2022 01:34 AM
Hi @Sivagami ,
Assuming you are already using this api/service account for calling APIs, the localauthenabled attribute on the user profile should already be 1. This attribute dictates whether local authentication would be allowed for a user when SSO is enabled on your application.
In that scenario, you can reset the password for your user using the 'changePassword' API.
Password change via this API would not set passwordexpired to 1 and hence the set password should work.
In case you still see a 401 after a password change via the api, check the localauthenabled value for your user via Analytics.
You can then set the value for localauthenabled as 1 via SaviyntForSaviynt user import or via CustomQuery job.
08/01/2022 03:29 AM
Thanks Sahaj for the response.
localauthenabled attribute is not 1 for api users that we already use.
I tried the API to set the password for the new apiuser and it worked this time.
Thanks much for the self-service option you provided.
08/31/2022 11:16 PM
Hi,
Thanks for the detailed solution. We have enabled localauthenabled=1 for the service account user and changed the password using the API endpoint mentioned above. However, we are seeing 401 when tried to get the API token using Postman.
We checked the value of localauthenabled using Analytics and see the value is set to 'true'. User also has a ADMIN SAV role and an active Saviynt account.
Could you please let us know what could the reason?
Thanks!
12/12/2022 02:36 PM
Were you able to resolve this? I have the same issue and have had no luck figuring it out.
12/12/2022 03:22 PM
12/13/2022 06:00 AM
We are using SSO so there is no way to test this user with the login page. I'm using the API. This was set up prior to my working in this environment. I followed this process:
12/13/2022 09:00 AM
can you provide logs when you hit api from postman
12/13/2022 07:33 AM
An update: tricked our SSO provider into allowing me to login to the UI as this user. I am able to log in. There appears to be no issue with the account. In 2020.1 there is no "reset API password" GUI option, so I'm wondering if this is somehow related to that. Does anyone know how this should work? Documentation is insufficient for this process.
12/19/2022
01:10 PM
- last edited on
12/19/2022
01:29 PM
by
Dave
I wanted to return and post instructions I received from Saviynt support which worked for us. You can reset the password via gui. I think for us the issue that we kept encountering was when you reset the password you must be sure to set passwordexpire=0 and you also must have localauthenabled set to true *before* the password reset. The steps below can be used for setup of an API user: