Cisco Support Community
Community Member

get device profile


Just wondering if it is possible to get device profile given any device criteria. I have only found getDeviceProfile in AXL which requires a profile name. I have not found any table relations in the documentation, for the SQL route, either.

My scenario is I have a list of devices and I want to get a device profile for each device to determin who has logged in and what the current directory number for the device is (for hotdesking purposes)

Many thanks for your time,



Re: get device profile

Device Profiles are stored in the device table. E.g. you have your autogenerated device profile (generated when you enable extension mobility and select "use current profile") - named ADP + MAC Address of the phone. The user device profiles are also in there, and named as they are in the appropriate ccmadmin pages (the same name you need to plug into getDeviceProfile).

However, if I understand what you want to do correctly, you're going the wrong route. The extension mobility API allows you to query who is currently logged into a phone. From that, you can get a list of deviceProfiles for the user (getUser command), and from that you can get getDeviceProfile. If the user has multiple profiles, you can then look at the directory numbers on the profile, and compare them with the directory numbers currently on the phone to pick the proper profile (or if all profiles have the same DNs, you need to find a uniquely distinguishable property between profiles... and search for it on the current phone (getPhone).

There's no record which device profile is currently applied on a certain phone.

CCM 5.0 and above have the notion of a default device profile - which you can extract via SQL, but there again, there's no direct way to identify which profile has been loaded onto a phone.

I suspect EM works as follows: once you log in, it saves the current phone settings in the ADP + MAC address device profile in the device table, then loads the selected device profile, and applies all the settings to the phone config (the SEPxxx entry in the device table), then the phone restarts, and voila, you're logged on. When you log out again, the settings from the ADPxxx profile are loaded and re-applied to the phone. That would also explain why it's not possible to make modifications while somebody is logged in (not that it's technically impossible.. it's just not as straightforward because a lot of parameters that will show up when you access the phone actually belong to the user's device profile, and not to the phone itself).

AXL also has two parameters, the loginUserId and ownerUserId parameters for getPhone.. the former is which user is currently logged in, so that's the alternative to using the EM service to query which user is logged into a specific phone.

Or, you do it via SQL, the query is as follows: select LoginUserid from device where name = '" + deviceName + "'"

Community Member

Re: get device profile

Hi Stephan, many thanks for your response. I have figured out how to get extension mobility profiles for logged in users via SQL. I am also running an sql query against the enduserdevicemap for device profiles. Just to clear it up

CreatePlease to create content