cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1471
Views
1
Helpful
5
Replies

UCCE : Finesse API for getting Agent-Id from Login-Name fails

Adinath
Level 1
Level 1

Hi,

For UCCE we need numeric Agent ID to be used with all finesse APIs.

So to get the this Agent ID from login name, we are using Finesse userget-user-id-from-loginname API.

This API starts failing when we login to Finesse desktop. But it then starts working after “some unspecified time” once we log out of finesse desktop.

Below are the steps

  1. Using Postman send a GET request to the URL https://<FQDN>:8445/finesse/api/User/<USER_NAME> Authorisation is basic-auth with the agent USER_NAME and password. We get back the User object with loginID and loginName.
  2. Login the same user to Finesse desktop using URL : https://<FQDN>:8445/desktop/container/landing.jsp?locale=en_US
  3. Try to fire the same GET API from step 1. We get below authorisation error:

 

<ApiErrors>
	<ApiError>
		<ErrorType>Invalid Authorization User Specified</ErrorType>
		<ErrorData/>
		<ErrorMessage>The user specified in the authentication credentials and the uri don&apos;t match</ErrorMessage>
	</ApiError>
</ApiErrors>​

 

             The API starts working again (but not immediately) after we logout from finesse desktop. (For my UCCE agent, it took approximately 30mins.)

This was reproducible in PCCE Cisco devnet sandbox.

Is this expected behaviour or we should always get the valid User object from the GetUser API regardless if the agent is logged-in to finesse desktop ?

Best Regards,

Adinath

5 Replies 5

realexan
Cisco Employee
Cisco Employee

Hi @Adinath ,

Ideally, this shouldn't happen. You can check the realm logs for pointers. You can find the ways to collect logs here: https://community.cisco.com/t5/collaboration-knowledge-base/how-to-collect-finesse-logs/tac-p/3135565

Regards,

Renjith

Hi @realexan ,

I've attached the webservices and realm logs for the scenario using PCCE sandbox agent2. Below are the log snippets with steps. I don't see any error in realm logs.

Successful GetUser request:
74004: [INFO]: [call-id []] [agent-id [12302]]: [Jan 24 2023 11:09:02.140 -0500]: [http-apr-127.0.0.1-8082-exec-29]: [c.c.c.f.s.ElapsedTimeFilter]: [REQUEST_START] method_name: GET, resource_name: /User/agent2, user: 12302, parameters: { }

Agent2 logs on:
74863: [INFO]: [call-id []] [agent-id [12302]]: [Jan 24 2023 11:15:18.549 -0500]: [http-apr-127.0.0.1-8082-exec-4]: [c.c.c.f.a.u.UserService]: [API_REQUEST] Request from client to webservice api. agent_id: 12302, request_id: 16c16288-cf69-4870-9040-74bb0bda091b, request_method: user.PUT, request_url: User/12302, params: extension:1002 state:LOGIN

Failed GetUser request:
74942: [INFO]: [call-id []] [agent-id [12302]]: [Jan 24 2023 11:15:24.318 -0500]: [http-apr-127.0.0.1-8082-exec-2]: [c.c.c.f.s.ElapsedTimeFilter]: [REQUEST_START] method_name: GET, resource_name: /User/agent2, user: 12302, parameters: { }
74963: [INFO]: [call-id []] [agent-id [12302]]: [Jan 24 2023 11:15:29.350 -0500]: [http-apr-127.0.0.1-8082-exec-35]: [c.c.c.f.s.ElapsedTimeFilter]: [REQUEST_START] method_name: GET, resource_name: /User/agent2, user: 12302, parameters: { }

Agent2 logs off:
75045: [INFO]: [call-id []] [agent-id [12302]]: [Jan 24 2023 11:15:50.843 -0500]: [http-apr-127.0.0.1-8082-exec-23]: [c.c.c.f.a.u.UserService]: [API_REQUEST] Request from client to webservice api. agent_id: 12302, request_id: 8b4c3149-080e-4162-b265-0b89dc31e902, request_method: user.PUT, request_url: User/12302, params: state:LOGOUT

Still failing GetUser requests:
75125: [INFO]: [call-id []] [agent-id [12302]]: [Jan 24 2023 11:16:00.565 -0500]: [http-apr-127.0.0.1-8082-exec-32]: [c.c.c.f.s.ElapsedTimeFilter]: [REQUEST_START] method_name: GET, resource_name: /User/agent2, user: 12302, parameters: { }
76674: [INFO]: [call-id []] [agent-id [12302]]: [Jan 24 2023 11:27:59.580 -0500]: [http-apr-127.0.0.1-8082-exec-47]: [c.c.c.f.s.ElapsedTimeFilter]: [REQUEST_START] method_name: GET, resource_name: /User/agent2, user: 12302, parameters: { }

Best Regards,

Adinath

Hi @Adinath ,

I was able to reproduce it.

I've raised a defect for tracking this: https://bst.cisco.com/bugsearch/bug/CSCwe18241

Regards,

Renjith

Thanks @realexan  !!

khorram1998
Level 1
Level 1

It is expected behavior that the Finesse userget-user-id-from-loginname API may not work correctly when an agent is logged into the Finesse desktop, as the login credentials for the API and the desktop may not match. This is likely due to the way the Finesse system handles authentication for the API and the desktop. Once the agent logs out of the desktop, the API should start working correctly again. This could be a limitation of the UCCE system and it's better to contact Cisco support for further assistance.

The API call for getting the Agent ID from login name in UCCE Finesse is as follows:

GET https://<FQDN>:8445/finesse/api/User/<USER_NAME>

Where <FQDN> is the fully qualified domain name of your Finesse server, and <USER_NAME> is the login name of the agent whose ID you want to retrieve.

The API call requires basic authentication, so you will need to include the agent's login name and password in the request header.

In addition, it is important to note that the API call may fail if the agent is currently logged in to the Finesse desktop, and may require the agent to log out and wait for some unspecified time before it starts working again. This is expected behavior, as the API call and the Finesse desktop share the same authentication credentials.

Please rate this and mark as solution/answer, if this resolved your issue
All the best,
AK