Hi,
We recently upgraded from CRM 2011 (rollup 6) to CRM 2013, on Premise. We are encountering an issue with XRM when attempting to query data. The results of the query is returning null due to the fact that the query is verifying SystemUser access to the Objects in SystemUserBusinessUnitEntityMap and PrincipalObjectAccess.
This portion of the query never existing in the version of CRM 2011 that we were running. I've included the query that is generated, captured directly from a SQL Profiler Trace:
exec sp_executesql N'select
top 5001 "customer_attendee0".Session as "Session"
, "customer_attendee0".s_Attendee as "s_attendee"
, "customer_attendee0".s_Access_Code as "s_access_code"
, "customer_attendee0".customer_attendeeId as "customer_attendeeid"
, "customer_attendee0".SessionName as "Sessionname"
, "customer_attendee0".s_AttendeeName as "s_attendeename"
from
customer_attendee as "customer_attendee0"
where
(("customer_attendee0".s_Access_Code = @s_Access_Code0) and ("customer_attendee0".OwningBusinessUnit in (select BusinessUnitId from SystemUserBusinessUnitEntityMap where SystemUserId = @SystemUserId0 and ObjectTypeCode = @ObjectTypeCode0) or "customer_attendee0".customer_attendeeId in (select ObjectId from fn_POARetrieveMultiple(@SystemUserId1, @ObjectTypeCode1)))) order by
"customer_attendee0".customer_attendeeId asc',N'@s_Access_Code0 nvarchar(100),@SystemUserId0 uniqueidentifier,@ObjectTypeCode0 int,@SystemUserId1 uniqueidentifier,@ObjectTypeCode1 int',@s_Access_Code0=N'XXXXXXXX',@SystemUserId0='YYYYYYYY-ZZZZ-AAAA-BBBB-E83935C273FD',@ObjectTypeCode0=10027,@SystemUserId1='YYYYYYYY-ZZZZ-AAAA-BBBB-E83935C273FD',@ObjectTypeCode1=10027
As a result, we have two questions
- Is there a way to bypass the checks against SystemUserBusinessUnitEntityMap and PrincipalObjectAccess through XRM configuration?
- What we found odd is the systemuser that is attempting to access the data is actually a system administrator however, when inspecting the SystemUserBusinessUnitEntityMap and PrincipalObjectAccess tables, the entries for this user cannot be found. Is there a configuration in CRM that will enable the system administrator to have access and ultimately generate entries in these tables? We've confirmed that the system admin has access (deep) to all tables in question.
Thank you.