RSS

How to Find a User From the User Telemetry ID

08 Jan

In my previous log entry I described how to find activity for a specific user in telemetry from Microsoft Business Central. This entry will be about doing the opposite, having a User Telemetry ID and then try to find which user it belongs to. The solution to this varies depending on which Business Central version you are running and which platform.

The User Telemetry ID can be found on the user card. However, this value is fetched from another table that is a system table, User Property. This means that you can’t filter on in the User table and that the system table is not accessible from the web client. There is another page you can use to filter on Telemetry User ID BUT at this time it doesn’t exist (BC 23.2). Hopefully it will come in BC 23.3 but it exists in the next major.

> Business Central version 23.2(?)

When I poked around in the BCApp repo I found that in the next major (BC 24) and perhaps next minor (23.3) there will be a new page, User Details, that you can filter on Telemetry User ID and easily which user it belongs too. This page can be accessed from the User List by choosing Navigate and “Show More Details”. When the page is opened it has created a temporary table that contains joined information from the User table and the User Property table.

And when you open it you get a list of users with extra information such as the Telemetry User ID.

Business Central version < 23.3

In these versions the Telemetry User ID only exist on the User Card which means you have to scroll each card until you find the user with the specific Telemetry User ID you are looking for.

Edit: Morten Bræmer Jensen informed me that you get a list by using the trick to publish the user card as a web service. This works on OnPrem and Cloud. He shows how to do this in Episode 246: In the Dynamics Corner Chair: A Tale of Telemetry and Two Lists.

Aren’t there any other options to get a list of users with their Telemetry User ID or do a lookup? Lets look at the table again User Property.

The table has scope OnPrem which makes it impossible to use this table in an extension for customers running in cloud. Now some BC hackers might say? “But how about RecordRef?“. Unfortunately not. I tried this and got “You cannot open record X from a RecordRef data type when you are using target Cloud“. This means that looking up a user with a Telemetry User ID doesn’t work for cloud installations. But a comfort is that in the future it will be possible and soon!

But how about OnPrem installations, is it better for them? No! In order to access this table the extension/app needs to have target level = OnPrem. With the Universal Code Initiative the customer needs to have an extra module in the license in order to run extensions with target = OnPrem. As of 2024 this will cost $75 per premium/essential user. So if your customer is not already having this module and is happy about it, it will be a very costly solution if the customer has many users.

But since you run OnPrem there is another option. Running OnPrem means that you should have access to the SQL and from there access the table (User Property) that contains the User Telemetry ID and join it together with the User table to get a list of users and their Telemetry User ID:s.

Connect to the database and run the following query and voila!

select [dbo].[User].[Full Name],[dbo].[User].[User Name],[dbo].[User Property].[Telemetry User ID] 
FROM [dbo].[User Property] INNER JOIN [dbo].[User]
ON ( [dbo].[User].[User Security ID] = [dbo].[User Property].[User Security ID] )

Now you can mark everything and then copy to excel and do your filter/search there for which user the Telemetry User ID belongs to.

Summary

  • Different Business Central versions have different methods for finding a user from a User Telemetry ID.
  • In BC version 23.3 and later, a new page called User Details will allow filtering on Telemetry User ID to find the corresponding user.
  • For BC versions earlier than 23.3, the Telemetry User ID exists only on the User Card, requiring manual scrolling through user cards to find the specific ID or publish the User Card as web service to get a list.
  • Accessing the User Property table for Telemetry User ID lookup is limited by scope and target level, posing challenges for cloud and OnPrem installations.
  • For OnPrem installations, accessing the SQL database and running a specific query can provide a list of users and their Telemetry User IDs.

 
Leave a comment

Posted by on 2024-01-08 in Okategoriserade

 

Tags: , , , , , ,

Leave a comment

 
Kauffmann @ Dynamics 365 Business Central

A good programmer makes all the right mistakes.

The BC Docs Librarian

Tips and news for AL programmers

Stefan Maroń

Dynamics 365 Business Central

James Pearson

Thoughts about Dynamics 365 Business Central, Git, Azure DevOps, PowerShell, Automated Testing, Visual Studio Code...and maybe some other stuff

Roberto Stefanetti BLOG

MVP & MCT Microsoft Dynamics 365 Business Central, Powershell, Azure, SQL Server

JoeBrown

DevOps starts with culture!

Comments for DevOps ABCs Blog

Reflections from the ERP field

DevOps ABCs Blog

Reflections from the ERP field

Dynamics 365 Business Central for Partners

Reflections from the ERP field

Freddys blog

Learn something new... - then Teach someone!

Stefano Demiliani Technical Blog

Reflections from the ERP field

David Worthington's NAV Performance Blog

Micosoft Dynamics NAV Performance Testing & Optimization

Freddys Blog

Reflections from the ERP field

Marije Brummel Blog | Business Central, Azure and more...

Design Patterns, Performance, Clean Code

Vjeko.com

Ideas in the cloud

Goprowe AB

Reflections from the ERP field

ArcherPoint

Reflections from the ERP field

The NAV Viking´s Blog

- Sharing my experience in the Dynamics NAV world

Comments for

Reflections from the ERP field