I am looking for a way to query the CUCM to get a logged in user's MAC address, and then remotely log them out.
If anyone could point me in a direction to start, that would be excellent!
Have you looked at the Extension Mobility API? You can use that API to discover what devices a user is logged into, and then use the device information to log out that user.
Here's one of the documents: https://developer.cisco.com/fileMedia/download/879128da-4637-48cd-bd67-0da73fc0f4f2
Here's the page of documents: https://developer.cisco.com/site/extension-mobility/documents/
I didn't even know where to start, this is fantastic.