Hello,
We are using MSCRM 2015 on premise version. I have couple of questions about disabling users from MSCRM using active directory
1) Is there any automated process already in MS CRM to disable users when users are disabled in Active directory?
2) If Yes, What is the process ?
3) If no, what would be the options to automate the process to disable the users in MSCRM when the user is disabled in Active directory?
Thanks for looking into it
*This post is locked for comments
Hi,
I have wrote Powershell script for this task, you can download it here:
gallery.technet.microsoft.com/Disable-Users-in-Dynamics-c9ebd012
1) Is there any automated process already in MS CRM to disable users when users are disabled in Active directory?
Answer: No OOB.
2) If Yes, What is the process ?
Answer : You can use 3rd party tools to SYNC active directory and CRM users like kingswaysoft. But doing that will have other demerit points. Check with your business as well. In that case you have to write some custom actions to reassign all the records from that user to a new user. How will you deal with incomplete activities. I remember we used Kingsway soft to SYNC our AD with CRM to create new users but not to deactivate.
3) If no, what would be the options to automate the process to disable the users in MSCRM when the user is disabled in Active directory?
Answer: You can also use some batch jobs/Windows task schedulers to read the users from AD and deactivate them in CRM if they are not active.
Some more 3rd Party tools for you to explore
www.connecting-software.com/.../connect-dynamics-crm-with-active-directory
community.dynamics.com/.../211313
Thanks for looking into it
Hi Kumar
Have a look at following two articles. These might get you better understanding of Active Directory and Dynamics CRM Users association:
https://celedonpartners.com/blog/reconnect-active-directory-accounts-dynamics-crm/
http://eimagine.com/how-to-safely-disable-a-user-in-microsoft-dynamics-crm/
One of the most important things to be aware of is that when you disable a user account that owns a workflow, it will also disable the workflow job as well. So before any user accounts are disabled, you must make sure any workflows still have an active user account, as this is needed to continue to process workflow jobs.
Tips on disabling user
1) First, make sure you reassign any records, workflows or activities associated with this user to another user or team before disabling the user account.
2) If you only want to disable a user for a short period of time, note that you may have to change user privileges for that period, especially if you want other users to be able to modify records while a user is disabled.
3) All published workflows should be owned by an administrative account, not an employee account, before disabling a user.
Hello Arun,
Thanks for the info. Do you have any code how I should do this?
You can have a nightly job (like C# console app in task scheduler or sql job) which check for disabled AD users & disable their user record in CRM.
You can have a delta pull from HR system or AD changes in a staging DB to check against.
Hi Kumar_901,
There are no inbuilt automatic processes for disabling users, but you can disable on-premises users and online users with the C# code in this sample. However, this does not disable users in CRM when a user is disabled in Active Directory.
Thanks Adrian.
I want to confirm that there is no inbuilt automatic process for disabling users . As of I know, we can write C# Code to disable user in CRM using active directory. I want to see if anyone has the code or if there is any better process for this?
Hi Vishnu Kumar9,
To answer your questions.
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,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156