One of the most useful features you can use to troubleshoot your MIIS provisioning is the Visual Studio Debug.

Because everything related to your provisioning is done in your code, it is very useful to follow step by step what’s going on in your code.

This is how its done:

First of all make sure your provisioning Code is not running in a separate process :

image

 

Same goes for you export and import rule extensions of course.

Then go to your visual Studio project configuration manager and make sure you are compiling you code in debug Mode:

image

 

To start your debugging attach your code to the MIIServer process.

image

and select a location in your code where you want to set your breakpoint, I like to start at the beginning but you can break at a any location if you are looking for something specific:

image

 

now go back to your synchronization service console and select a user you want to test the synchronization process on:

basically a user you just imported

image

select preview and generate a preview:

image

And if you did everything right your debugging process will start and visual studio will stop at the breakpoint you specified and you will be able to cycle through your code seeing exactly what happens at every line:

 

image

 

If after you click on generate preview the debug does not work check the following:

  • You ran your code in debug mode
  • Check for the debug file generated next to you dll and delete it then recompile
  • Your provisioning or extension attribute dlls are not running in separate processes

Hope this helps