09-18-2020 04:57 AM
First of all. I am sorry to potentially double post. I made this post once already, and it shows up in my profile, but just leads to an error message. The thread no longer shows up in the overview either. So here we go again.
I have a small program running that needs to resolve the userID from the username of the agent using the program. To do this i call https://finesse/finesse/api/User/(loginName) to get the user object. I use the basic authentication http header to login via (loginName)/(password). This works most of the time, but I sometimes encounter windows of about 15 minutes where the service returns 401 for certain users with the following payload:
<ApiErrors>
<ApiError>
<ErrorType>Invalid Authorization User Specified</ErrorType>
<ErrorData></ErrorData>
<ErrorMessage>The user specified in the authentication credentials and the uri don't match</ErrorMessage>
</ApiError>
</ApiErrors>
If i replace the username in either the login OR url, the request works as expected and i get the user object back. So https://finesse/finesse/api/User/(loginName) authorized by (loginID)/(Password) works fine and https://finesse/finesse/api/User/(loginID) authorized by (loginName)/(Password) works fine. https://finesse/finesse/api/User/(loginName) authorized by (loginName)/(Password) fails with the 401.
The error persists for a while, usually about 15 minutes, after which it starts working again. The error seems to be limited to certain users. While the error persists for one user, another user will work just fine.
I have found no workarounds, and no way to get around the problem or make it go away, apart from waiting until the problem magically fixes itself.
Does anyone know what is going on? And even better, how to fix the problem?
09-18-2020 06:42 AM
Do you have an actual program or is this a gadget? My question would be more around can you remove Finesse from the equation and setup a job to do the same request every 15 minutes and see if you ever get a failure. If you don't then the issue might be within Finesse.
david
09-18-2020 07:04 AM
Hello David and thank you for answering
I have an angular application that calls the aforementioned endpoint via rest. I am logging in via the BOSH client in this application as well, although on a different resource than Finesse does. At no point am i logging in with Finesse. Although i cannot guarantee that someone else isn't logging into finesse as the users are shared test users. I have tried logging into the application and finesse at the same time, but it doesn't seem to be related. If it is related it is not consistent.
09-19-2020 02:51 PM
What are you using for authentication? The API expects a supervisor login or the same agent as you're requesting.
david
09-21-2020 12:15 AM
Hello David.
I am using the agent credentials of the agent i am retrieving. The service works fine except when i call it using the agents loginname in both the url and authentication header. The error is intermittent being triggered by *something* and is then constant for 15 minutes. Using the agentID for either the URL or Authentication header returns without error within those 15 minutes, but any call using the LoginName for both URL and Authencation header fails.
Upon further investigation it does seem to happen when the user logs into Finesse, but it is not consistent, so it doesn't happen on every login. I'm not quite sure though, it could be a false observation.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide