CRM Extensions

MS CRM 2011: Bulk refresh of user details from AD

When you create user in CRM all the available information is populated from AD into CRM user form. But in case information was changed in AD (email box, phone e.t.c.) – information will remain unchanged till the moment you will open form of user and change it. In case a lot of information was changed it will be quite boring to update users information one-by-one.

Following post describes how to allow bulk update of user details.

First step – JavaScript that will do update of data – create webresource, put inside following code, save and publish:

 

Second step – modify ribbon to add “Refresh” button to users grid. I prefer to use tools for it and here are screenshots:




Here is RibbonXml:

In the case you have performed everything correctly in users ribbon you will find new button:

Functions that are used for fetching of users’ information are undocumented so I assume that in common this customization is unsupported.

I want to say special thanks to my friend Artem Grunin who is former MVP and employee of Microsoft. Here is his article regarding similar issue for CRM 4.0 – http://fixrm.wordpress.com/2011/02/02/how-to-update-crm-user-profile-from-active-directory/

5 Comments on “MS CRM 2011: Bulk refresh of user details from AD

  1. I implemented per instructions – removed Main Phone and email address from a user (info came from AD during original import) – refreshed user – Main Phone and email address were NOT updated.

  2. Hi there,

    I’ve also implemented the JS and button step by step in CRM 2016 but the functionality is not working as you’ve explained.

    Could you please revisit it and see if any changes are required in your code.

    1. Hello Kumar,
      I did a quick check and it looks like payload and endpoint used are still the same in CRM 2016 but there is a high chance that this code (written when CRM 2011 supported only IE) would not work now. I believe to make it work you will have to rework send of request and parsing of response pieces. Also if I’m not wrong Xrm.Page.context.prependOrgName method was deprecated and not available now so you will have to replace it with Xrm.Page.context.getClientUrl. Fell free to ask any questions and share with your progress.
      Thanks,
      Andrew

Leave a Reply

Your email address will not be published. Required fields are marked *