We have a User Import process that keeps our CRM environment in sync with Active Directory, and being On Prem I can easily compare the Active Directory GUID from AD (via ADSI) back to the Active Directory GUID in CRM (systemuser entity) to verify everything lines up. How though do I get the Active Directory GUID from FetchXML so I can avoid using a direct SQL call to get this information? When I use FetchXML Builder in XrmToolBox and add activedirectoryguid I get a notice saying "Retrieve can only return columns that are valid to read". Why can I not get this information via FetchXML? And how can I get it from CRM directly without going back to the SQL table?
The issue comes in when a Domain Name in AD changes. If I key only on Domain Name then try to add the new Domain Name it fails saying the user already exists since the AD Guid has already been used. After some hunting to find the original Domain Name I resync the new Domain Name in CRM to update the details, but given I have the AD Guid from both AD and CRM it works great to just sync on this in the process. If the Domain Name changes it just updates this just as it would update the title or name. Also note I'm updating CRM via CozyRoc,so though reading the CRM AD GUID is coming from SQL updates are not.
Thank you for any advise or suggestions.
*This post is locked for comments
Hello Samalex,
Since you are using Dynamics CRM On-premise and you got the error message via FetchXML because would not be possible to get the attribute, i would use a SQL query.
There is no problem by using a select statement on Dynamics CRM databases, since you can do it when using Reports.
Cheers!
Pedro Pisco
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156