Check out the latest features available in Dynamics 365 for Customer Engagement, including LinkedIn Connect, Voice of the Customer and Universal Resource Scheduling.
Dynamics 365 2019 release wave 2 plan Discover the latest updates to Dynamics 365.Release Plan | Weekly Deployment Notes
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants.Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements.
ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Talent TechTalks
I have 1000 of account record GUIDs, want to know these records are shared to any team or any user.
Is there any programmatic way to approach?
Thanks & Regards,
since you are using crm online.
Use below fetchxml to find all the record that shared to user, but of course you have to change a little bit.
ps: you can create as a ssrs report.
You can also check below reference after retrieving the user or team how to share the records.
You can do this with "RetrieveSharedPrincipalsAndAccessRequest", please look at https://msdn.microsoft.com/en-us/library/microsoft.crm.sdk.messages.retrievesharedprincipalsandaccessrequest.aspx for more information.
Sample code is below;
RetrieveSharedPrincipalsAndAccessRequest request = new RetrieveSharedPrincipalsAndAccessRequest()
Target = new EntityReference(entityLogicalName, recordId)
var serviceResponse = (RetrieveSharedPrincipalsAndAccessResponse)IOrganizationService.Execute(request);
You can also use XrmLibrary (2015 or 2016) and just do it with simple 2 lines below (blue lines optional process)
CommonHelper commonHelper = new CommonHelper(_organizationService);
var sharedPrincipalList = commonHelper.GetSharedPrincipalsAndAccess(Guid.Parse("RECORD ID"), "ENTITY LOGICAL NAME");
if (sharedPrincipalList != null && sharedPrincipalList.Count > 0)
foreach (var item in sharedPrincipalList)
var principalInfo = item.Principal; //This returns EntityReference, so you can get PrincipalType (Team or SystemUser) and Id (for Team or SystemUser)
Business Applications communities