There is really no way to find this information. When you create a report for MSCRM, you use a connector called "MSCRM Data Connector". This can be seen in the AdditionnalInfo column of the ExecutionLogs3 view of the SSRS instance. When using this connector and trying to show a report, you will receive a request for a username and password. Where things get interesting.
The report does not actually expect a username / password! In fact, he expects to get systemuserid (guid) as the username and organizationid (guid) as the password. He then searches the database MSCRM_CONFIG for the organization's database parameters. Then it enters the organizationโs database and simply executes set context_info SYSTEMUSERID . Finally, filterviews call a function called "[dbo]. [Fn_FindUserGuid]", which retrieves context_info. Thus, the filtered views work correctly and are connected as a service account.
As you expected, we cannot know the user who ran the report because username and password hints are never logged anywhere in SSRS (for security reasons, maybe).
The best option I found for registration, which ran the report, is actually to create a stored procedure that will make the selection statement in the filtered views (or any tables, as it is), and then write the statement, procedure parameters and context_info () to a separate table . Then in SSRS, I call this function instead of directly viewing the filtered views.
Dominic goulet
source share