Showing results for 
Search instead for 
Did you mean: 

listUser - how to extract primary Extension

Rising star
Rising star


I want to do a list request on users that just returns userId and primary extension (if there's one). My requests do work, however, they all only contain the userid even though several users have primary extensions defined.

I'm adding <primaryExtension/pattern/> and <primaryExtension/routePartitionName/> to my <returnTags> but it doesn't work (actually, I encode the slash within the tag with 0x2f so it's valid XML. If I just add <pattern/> and <routePartitionName/> I have the same story.. all users are returned, none with a primary extension.

Has anybody managed to write a request that gets you both userid and primary extension?

2 Replies 2

Cisco Employee
Cisco Employee

Maybe I don't understand the problem, but this works fine for me:

<soapenv:Envelope xmlns:soapenv="" xmlns:ns="">



      <ns:listUser sequence="?">




         <returnedTags uuid="?">










Thanks Nicholas. Somehow the tag with inner tags thing slipped my mind. I blame my former colleague who didn't quite test return tags in our custom lib (it wasn't set up to support inner tags so my query ended up being <returnedTags><userId/><primaryExtension/pattern/><primaryExtension/routePartitionName/></returnTags> which didn't work out. Supporting inner tags in a return tag fixed the issue.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: