<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>missmiis</title>
	
	<link>http://www.wapshere.com/missmiis</link>
	<description>Adventures in ILM, Exchange, and whatever else I happen to be working on</description>
	<lastBuildDate>Mon, 08 Mar 2010 10:41:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/missmiis" /><feedburner:info uri="missmiis" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>FIM Newbies – please also look at the “old” sync methods before making a decision</title>
		<link>http://feedproxy.google.com/~r/missmiis/~3/RoLIZW5W5jU/fim-newbies-please-also-look-at-the-old-sync-methods-before-making-a-decision</link>
		<comments>http://www.wapshere.com/missmiis/fim-newbies-please-also-look-at-the-old-sync-methods-before-making-a-decision#comments</comments>
		<pubDate>Mon, 08 Mar 2010 10:35:10 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[FIM 2010]]></category>
		<category><![CDATA[newbie]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=709</guid>
		<description><![CDATA[There&#8217;s a lot of interest in FIM, and that&#8217;s great &#8211; but I worry about all the focus on the codeless sync rules, which I&#8217;m not a fan of. Meanwhile behind it we have the best, most efficient and most flexible sync engine out there, now in 64-bits, and ready to do all sorts of impressive [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a lot of interest in FIM, and that&#8217;s great &#8211; but I worry about all the focus on the codeless sync rules, which I&#8217;m not a fan of. Meanwhile behind it we have the best, most efficient and most flexible sync engine out there, now in 64-bits, and ready to do all sorts of impressive feats of provisioning and synchronizing, if you just put the time into learning how to configure it properly.<span id="more-709"></span></p>
<p>Here&#8217;s why I don&#8217;t like codeless sync rules (aka &#8220;Declarative Provisioning&#8221;):</p>
<ul>
<li>They don&#8217;t do everything you need,</li>
<li>The whole Sync Rule &#8211; Workflow &#8211; MPR combination will get overly complex once you have a few different scenarios on the go,</li>
<li>It&#8217;s difficult to troubleshoot,</li>
<li>It adds extra objects (EREs and DREs) to slow down the sync &#8211; and the FIMMA is slow enough already,</li>
<li>It requires CALs, which will put it out of the price range for a lot of people anyway.</li>
</ul>
<p>There are already plenty of questions on the forum along the lines of &#8221;How can I do x with codeless?&#8221; And more often than not the answer is &#8220;You can&#8217;t &#8211; but you can do it with a coded sync rule&#8221;. The fact is, to get the most out of this product you must, must, must learn about the ILM/MIIS ways of programming the Sync Service. And you may even find that it&#8217;s enough for your needs, and you can do without the CALs for now.</p>
<p>If you&#8217;d like to learn some more about traditional ILM methods then these posts are a good place to start: <a href="http://www.wapshere.com/missmiis/new-to-ilm-start-here">http://www.wapshere.com/missmiis/new-to-ilm-start-here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/fim-newbies-please-also-look-at-the-old-sync-methods-before-making-a-decision/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wapshere.com/missmiis/fim-newbies-please-also-look-at-the-old-sync-methods-before-making-a-decision</feedburner:origLink></item>
		<item>
		<title>Creating Groups in the FIM Portal using powershell</title>
		<link>http://feedproxy.google.com/~r/missmiis/~3/XfzX97vAnyM/creating-groups-in-the-fim-portal-using-powershell</link>
		<comments>http://www.wapshere.com/missmiis/creating-groups-in-the-fim-portal-using-powershell#comments</comments>
		<pubDate>Sun, 28 Feb 2010 13:56:36 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[FIM 2010]]></category>
		<category><![CDATA[Groups]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=703</guid>
		<description><![CDATA[I&#8217;ve been having a bit of a play with the powershell interface to the FIM Portal. I wanted to pre-populate a demo environment with an interesting set of criteria-based Securoity and Distribution groups, but they get a bit tedious to create by hand, and I wanted to see if powershell was the answer.
I&#8217;m pretty pleased [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been having a bit of a play with the powershell interface to the FIM Portal. I wanted to pre-populate a demo environment with an interesting set of criteria-based Securoity and Distribution groups, but they get a bit tedious to create by hand, and I wanted to see if powershell was the answer.</p>
<p>I&#8217;m pretty pleased with the results. Both of the following scripts use a CSV to bulk-create the groups:</p>
<p><a href="http://www.wapshere.com/missmiis/create-fimsecgroups-ps1">Create Security Groups based on Filters</a></p>
<p><a href="http://www.wapshere.com/missmiis/create-fimdistlists-ps1">Create Distribution Lists for Managers which contain all the people they manage</a></p>
<p><span id="more-703"></span></p>
<p>The scripts run pretty slowly, but it&#8217;s still quicker than creating the groups by hand.</p>
<p>If you want to have a go at a script like this (and you can&#8217;t find an example in the ever-growing <a href="http://social.technet.microsoft.com/Forums/en-US/ilm2/thread/807617bc-b560-4cbe-a137-b9f338bfbd8e">FIM Scriptbox</a>) then I suggest you create a sample object by hand and then inspect both the object&#8217;s Advanced Properites, and the Details of the Request object which created it, for an idea of which attribute to populate.</p>
<p>While developing the scripts I saw the following error far more times that I would have liked:</p>
<blockquote><p>Microsoft.ResourceManagement.WebServices.Client.PermissionDeniedException: Policy prohibits the request from completing.</p></blockquote>
<p>After messing around with MPRs it eventually became clear that this just meant I had populated an attribute incorrently, or missed one out, and was not about permissions at all.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/creating-groups-in-the-fim-portal-using-powershell/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wapshere.com/missmiis/creating-groups-in-the-fim-portal-using-powershell</feedburner:origLink></item>
		<item>
		<title>ConnectionChangeTime</title>
		<link>http://feedproxy.google.com/~r/missmiis/~3/G7uXqJKFc6A/connectionchangetime</link>
		<comments>http://www.wapshere.com/missmiis/connectionchangetime#comments</comments>
		<pubDate>Thu, 25 Feb 2010 18:25:22 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=683</guid>
		<description><![CDATA[This got me out of a pickle today. A slip-up in a join rule caused hundreds of bad joins to be made. There were far too many to un-do by hand, but then I figured out I could add a few lines to the Provisioning Sub of the MVExtension to remove all the joins made [...]]]></description>
			<content:encoded><![CDATA[<p>This got me out of a pickle today. A slip-up in a join rule caused hundreds of bad joins to be made. There were far too many to un-do by hand, but then I figured out I could add a few lines to the Provisioning Sub of the MVExtension to remove all the joins made in the past hour:<br />
<code><br />
If mventry.ConnectedMAs(<em>Ma Name</em>).Connectors.Count &gt; 0 _<br />
AndAlso DateDiff(DateInterval.Hour, mventry.ConnectedMAs(<em>Ma Name</em>).Connectors.ByIndex(0).ConnectionChangeTime, Now) &lt; 1 Then<br />
  mventry.ConnectedMAs(<em>Ma Name</em>).Connectors.ByIndex(0).Deprovision()<br />
End If</code></p>
<p>Handy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/connectionchangetime/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wapshere.com/missmiis/connectionchangetime</feedburner:origLink></item>
		<item>
		<title>Account Deprovisioning Scenarios</title>
		<link>http://feedproxy.google.com/~r/missmiis/~3/CEndv6H_ZHc/account-deprovisioning-scenarios</link>
		<comments>http://www.wapshere.com/missmiis/account-deprovisioning-scenarios#comments</comments>
		<pubDate>Tue, 26 Jan 2010 12:57:53 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[ILM 2007]]></category>
		<category><![CDATA[MIIS 2003]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=671</guid>
		<description><![CDATA[
I just posted this article in the Greatest Hits series of the ILM Technet forum. It describes some of the methods and considerations around disabling and deleting users accounts with ILM.

In Identity Management, deprovisioning is every bit as important as provisioning – in fact the security guys would say it is more important.
End-of-life management may [...]]]></description>
			<content:encoded><![CDATA[<p><!--Start Here --></p>
<p>I just posted this article in the Greatest Hits series of the ILM Technet forum. It describes some of the methods and considerations around disabling and deleting users accounts with ILM.</p>
<p><span id="more-671"></span></p>
<p>In Identity Management, deprovisioning is every bit as important as provisioning – in fact the security guys would say it is more important.</p>
<p>End-of-life management may have been one of the determining factors that got the IdM project started in the first place – while most<br />
organizations have a variety of scripts and processes they use to create accounts and assign permissions, the cleanup when a person leaves is often not handled so well.</p>
<p>General rules for object deletion have been already well covered in Markus’ article<br />
<a href="http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/603c4f8c-d782-4625-a045-009d15ed0f3b" target="_blank">Understanding Deletions in ILM</a>; however there is more that can be said on the subject of user accounts, for which an immediate delete is often not appropriate.</p>
<p>This article shows how you can use ILM to configure a flexible deprovisioning solution that is customized to your technical, organizational and compliance needs.</p>
<h2>Account Deprovisioning Scenarios in this document</h2>
<p>We are going to look at the following types of account deprovisioning:</p>
<ol>
<li>Simple deletion</li>
<li>Disabling the account</li>
<li>Deleting the account on a time-delayed basis</li>
<li>Stopping ILM from managing the account without actually deleting it (disconnection)</li>
</ol>
<h2>Parts to the Account Deprovisioning Puzzle</h2>
<p>Depending on your needs, you will most likely have to piece together a number of different elements to achieve the desired result.</p>
<p><strong>Account Disabling:</strong></p>
<p>Deactivating an object normally involves changing one or more of its attributes (eg.: setting userAccountControl on an AD user), and the usual way to do this is with an export attribute flow (EAF).</p>
<p>See code example “<em><a href="#Disabling Flow Rules">Disabling Flow Rules</a></em>” below.</p>
<p><strong>Moving deactivated accounts:</strong></p>
<ul>
<li>A common practice is to put disabled accounts in a particular place, such as a “<em>Disabled</em>” OU.For AD this is a &#8220;<em>Rename</em>&#8221; activity, and is typically done in the metaverse<br />
extension code.</li>
<li>For the “<em>Stop management</em>” scenario it is also possible to move the account just prior to disconnecting it in the MA Extension Deprovision method.</li>
</ul>
<p>See code example “<em><a href="#Metaverse Deprovisioning">Metaverse Deprovisioning</a></em>” below.<br />
 </p>
<p><strong>Deleting the connector space (CS) object:</strong></p>
<ul>
<li>The first step to deleting an account is to delete the object that represents it in the connector space.This can happen in one of the following two ways:
<ul>
<li>The joined Metaverse object is deleted</li>
<li>The joined Metaverse object was disconnected, either manually or by using the<br />
<em>CSEntry.Deprovision()</em> method in the<br />
metaverse extension code.</li>
</ul>
</li>
<li>In both cases a deletion will only happen if the &#8220;<em>Configure Deprovisioning</em>&#8221; tab on the MA configuration has been set as follows:
<ul>
<li>“<em>Stage a delete on the object for the next export run</em>”, or</li>
<li>“<em>Determine with a rules extension</em>” AND the rules extension code returns<br />
<em>DeprovisionAction.Delete</em>.</li>
</ul>
</li>
</ul>
<p> <br />
See code example “<em><a href="#MA Deprovision Sub">MA Deprovision Sub</a></em>” below<br />
 <br />
See “<em><a href="#Metaverse Deprovisioning">Metaverse Deprovisioning</a></em>” for an example of the <em>CSEntry.Deprovision()</em> method.<br />
 </p>
<p><strong>Deleting the account in the connected data source (CDS):</strong></p>
<ul>
<li>To delete the actual object in the CDS, we must first delete the connector space object using the methods above, after which we should find an export of type “<em>delete</em>” ready in the connector space.It is then just a matter of running an Export.
<ul>
<li>Note that the account used by the MA must have permission to delete objects of this type in the CDS.</li>
<li>Note also that if the MA is of type “Extensible Connectivity” you must write a Delete method in the Connected Data Source extension (see example below).</li>
</ul>
</li>
</ul>
<p> <br />
See code example “<a href="#XMA Delete Method">XMA Delete Method</a>” below.<br />
 </p>
<p><strong>Time dependant deletion:</strong></p>
<ul>
<li>Sometimes you want to delete an object on a certain date – perhaps an expiration date, or 3 months after the account was disabled.To do this you need the date available on the Metaverse object, which means you have to flow it into the Metaverse from somewhere.
<ul>
<li>An example for AD accounts is to use a spare attribute on the account, such as info or one of the extensionAttributes, to write the date at the same time as you disable the account.Flow this value back into the Metaverse and the information will be available.</li>
</ul>
</li>
</ul>
<p> <br />
See code example “<a href="#Metaverse Deprovisioning">Metaverse Deprovisioning</a>” below.<br />
 </p>
<h2>Deprovisioning Scenarios</h2>
<h3>Simple Deprovision based on disappearance</h3>
<p>The simplest deprovisioning scenario, and the one that can be executed without writing any code, is the “disappearance” scenario.</p>
<p>Here an object (or database line, or text file line) disappears from a source MA and is imported as a delete.</p>
<p>In the Metaverse we have configured our Object Deletion Rule as “<em>Delete Metaverse object when connector from this management agent is disconnected</em>” and selected our source MA.</p>
<p>Finally we have configured our other MAs to delete the CS objects when the Metaverse object is deleted.</p>
<p>In this way we could, for example, delete an AD account because the person’s record disappeared from the HR data source.</p>
<blockquote><p><strong>Caution: This method may lead to unexpected loss of accounts, temper and job!</strong></p></blockquote>
<p>As a general rule, it is a bad idea to make destructive decisions based on an absence of information. All sorts of errors, both human and machine, could happen to cause data to be unavailable at the time an Import runs. If you do use this simple approach, only use it for low-priority objects that can be deleted and recreated without much impact.</p>
<h3>Deprovision based on attribute change</h3>
<p>It is a much better practice to make deprovisioning decisions based on positive data.</p>
<p>So, with the HR data source, we continue to import resigned people, but with a status flag that indicates they are now inactive.</p>
<p>We then write some code in the metaverse extension which reacts to the person’s “inactive” status.</p>
<p>The great advantage to this method is the flexibility it gives us.</p>
<p>For example, we may deal with the person’s connected objects in different ways, deleting contacts and application accounts immediately<br />
but, just disabling the AD user account until further notice.</p>
<p>Deprovisioning a connector space object from metaverse extension code is trivial – all you have to do is add the line</p>
<p><em>CSEntry.Deprovision()</em></p>
<p>The bulk of the code before this will be spent in testing attribute values, and connections to different MAs, to determine when conditions are right to issue this command.</p>
<h3>Disable then delete</h3>
<p>It is simple enough to disable an account using an EAF (see example “<a href="#Disabling Flow Rules">Disabling Flow Rules</a>” below).</p>
<p>You could also move the account to a special location (see example “<a href="#Metaverse Deprovisioning">Metaverse Deprovisioning</a>” below).</p>
<p>However what do you do if you want to remove the account at some point in the future?</p>
<p>The first thing to be aware of is you must not delete the metaverse object.</p>
<p>To be able to delete the disabled account in the future it has to be connected to something in the<br />
metaverse.</p>
<p>ILM can only manage connectors.</p>
<p>Next, you will need some kind of <em>datestamp</em> on the metaverse object so your<br />
metaverse extension code will know when it’s OK to delete the account.</p>
<p>The only way to write a value to a metaverse object is with an IAF – so this implies writing the<br />
<em>datestamp</em> outside ILM, on a CDS object, and then importing it back in.</p>
<p>The method in the code examples below works like this:</p>
<ol>
<li>Based on the status attribute in the Metaverse, I export the <em>userAccountControl</em> to disable the AD user account,</li>
<li>Based on the same rules, I also export today’s date to the user’s info attribute,</li>
<li>II import info back to a metaverse attribute called <em>disableDate</em>,</li>
<li>I can then use <em>disableDate</em> in my metaverse extension to decide when the time is right to issue a CSEntry.Deprovision().</li>
</ol>
<p>There are a couple of points to note about this method:</p>
<ul>
<li>While disables will happen on a delta sync, deletions will only happen on a<br />
full sync.</li>
<li>The CDS attribute used to hold the date could be modified in the CDS (though you can use this to your advantage if you want to extend the disabled life of an account).</li>
</ul>
<h3>Stop Managing an Object</h3>
<p>In some cases object deletion is handled in the CDS itself and all you need to do is to stop managing the object.</p>
<p>In ILM terminology the object becomes a “disconnector” and, while it may still exist in the MA’s connector space, it is no longer connected to a Metaverse object, and ILM can no longer impact it in any way.</p>
<p>To disconnect rather than delete you actually use exactly the same CSEntry.Deprovision() method, but with the correct option selected on your MA’s Configure Deprovisioning page.</p>
<p>You could choose to:</p>
<ul>
<li>“Make them disconnectors”. The object is disconnected but remains in the CS and CDS.It will be reassessed for possible joins at each Full Sync,</li>
<li>“Make them explicit disconnectors”.Like the above, but it will not be reassessed for possible joins, or</li>
<li>Decide with a Rule Extension (see example “<a href="#MA Deprovision Sub">MA Deprovision Sub</a>” below).</li>
</ul>
<p>The “explicit” option needs a bit more discussion.</p>
<p>If ever you delete and re-import the CS all “<em>explicit</em>” tags will be lost and the objects become regular disconnectors again, and available for joins.</p>
<p>This option should only be chosen in particular circumstances, such as when there is a regular and reliable deletion of redundant objects happening in the CDS.</p>
<p>If you are sure that you will not need to rejoin to an object once it has been disconnected then another idea is to export a blocking attribute before disconnecting.</p>
<p>For example you export the string “<em>Unmanaged</em>” to an attribute on the CDS object, and only disconnect it once the attribute value is confirmed.</p>
<p>You can then use this attribute in a Connection Filter to prevent future re-connections.</p>
<h2>Some Common Problems and Questions</h2>
<h3>I staged some Deletes but I don’t want to export them now</h3>
<p>Perhaps there was an error in your code or your import data and you have a bunch of Deletes waiting to go out – but you really don’t want to do that!</p>
<p>Even after correcting the code and re-syncing you may find they turn into Delete-Adds – these should also not be exported as the actual CDS objects will be deleted and recreated – not great for AD accounts!</p>
<p>Unfortunately, the only full-proof fix in this case is a delete and re-import of the connector space.</p>
<h3>I have some old accounts with no HR reference – will ILM delete them?</h3>
<p>ILM can only delete objects that it is connected to, so if it never connected to the object it can never delete it.</p>
<p>If you plan to tidy up unmanaged objects in your CDS then have a look at the tool csexport.exe (from the MIIS\bin folder) which can be used to export lists of disconnectors.</p>
<h3>How can I block an Export if there are too many Disables?</h3>
<p>The Export run profile contains an option to stop the job if there are more than a certain number of Deletes queued to go out.</p>
<p>Unfortunately it is not possible to do something similar for disables with native functionality.</p>
<p>If something like this is needed then it should be possible to increment a count in a file from the EAF which deactivates the account, and then modify the script which runs the Export profile to first check the count.</p>
<h3>Sideways Joins</h3>
<p>A scenario you need to watch out for is what I call a “<em>sideways join</em>”.</p>
<p>Take a situation where the “<em>person</em>” object type has one source MA (eg.: HR) and multiple target MAs (AD, Notes, some other applications).</p>
<p>The source object has been deleted, but one or more of the target objects have remained and are still joined to a<br />
metaverse object.</p>
<p>The problem here is that these objects won’t show up in lists of disconnectors and so can remain, unobserved, for some time.</p>
<p>If deprovisioning logic is based on a value from the source MA then, in a default configuration, this value would have been recalled and is no longer present on the Metaverse object – so your code is probably just skipping it.</p>
<p>When writing your metaverse extension code, it is a good idea to test for unexpected situations – like an object with no connector in the primary source MA – and then throw an error or otherwise deal with the object.</p>
<h3>I can see Deletes staged in the connector space, but the objects don’t get deleted in the external system</h3>
<p>First, look for error messages in Identity Manager and in the Event Log that may indicate the problem.</p>
<p>Make sure the account used by the MA has the correct permissions in the CDS.</p>
<p>If it’s an “<em>Extensible Connectivity</em>” MA, check that a Delete method has been written in the Connected Data Source Extension.</p>
<h3>I disabled an AD user – now how do I remove it from groups?</h3>
<p>This is one with no short answer.</p>
<p>You cannot manage the <em>memberOf</em> attribute on AD users as it is a backlinked attribute.</p>
<p>So group membership can only be managed through the member attribute of groups.</p>
<p>This is fine if you are already managing AD groups with ILM – but not ok if they are managed manually in AD.</p>
<p>One of the reasons to keep an account in a disabled state for a while is to allow it to be restored quickly with all its previous rights intact – so removing it from groups may not be the best idea anyway.</p>
<p>If it is necessary then the choices are to fully take over group management with ILM, or to write a script that removes disabled users from groups, and is run outside of ILM.</p>
<h2>Code Examples</h2>
<h3>MA Deprovision Sub</h3>
<p><a name="MA Deprovision Sub">In</a> this example, when the Metaverse object is deleted or disconnected, accounts in the “<em>Student</em>” OU are deleted while accounts in the “<em>Staff</em>” OU become disconnectors.</p>
<p>This sub is located in the Management Agent Extension code.</p>
<pre lang="x-js">Public Function Deprovision(ByVal csentry As CSEntry) As DeprovisionAction Implements IMASynchronization.Deprovision
   If csentry.DN.ToString.Contains("OU=Students") Then
      Return DeprovisionAction.Delete
   ElseIf csentry.DN.ToString.Contains("OU=Staff") Then
      ' Optionally, rename the cs object or change attributes
      ' just prior to disconnecting
      Return DeprovisionAction.Disconnect
   Else
      Throw New UnexpectedDataException("DN does not contain " _
      &amp; "'OU=Staff' or 'OU=Students' so I don't know " _
      &amp; "which deprovision action to perform.")
   End If
End Function</pre>
<h3>Metaverse Deprovisioning</h3>
<p><a name="Metaverse Deprovisioning">In</a> this example we use the user’s status attribute in the Metaverse to decide if the account should be moved to a “<em>Disabled</em>” OU.</p>
<p>(The actual account disabling is done by an EAF and the <em>disableDate</em> and<br />
<em>userAccountControl</em> are flowed back by IAFs – see below.)</p>
<p>We then use the <em>disableDate</em> attribute on the metaverse object to decide when to perform the final deletion.</p>
<p>This example subroutine has been called from <em>Sub Provision</em> which is located in the Metaverse Extension code.</p>
<pre lang="x-js">Private Sub User_Provisioning(ByVal mventry As MVEntry)
   Dim ADMA As ConnectedMA = mventry.ConnectedMAs("MyDomain")
   Dim expectedDN As ReferenceValue
   Dim ShouldExist As Boolean
   Dim DoesExist As Boolean
   Const OU_USERS As String = "OU=Users,OU=MyOrg,DC=mydomain,DC=com"
   Const OU_DISABLED As String = "OU=Disabled,OU=Users,OU=MyOrg,DC=mydomain,DC=com"
   Const KEEP_DISABLED_DAYS As Integer = 90

   '' Should the account exist?
   '' Inactive accounts should exist for KEEP_DISABLED_DAYS after being disabled.
   If mventry("status").IsPresent AndAlso mventry("status").StringValue = "Active" Then
      ShouldExist = True
   Else
      ShouldExist = False

      If MVEntry("userAccountControl").IsPresent AndAlso _
         MVEntry("disableDate").IsPresent Then

         If (MVEntry("userAccountControl").IntegerValue And ADS_UF_ACCOUNTDISABLE) = _
             ADS_UF_ACCOUNTDISABLE Then

            'Account disabled – allow to exist until deletion date
            ShouldExist = True

            Dim disabledDate As DateTime
            disabledDate = Convert.ToDateTime(MVEntry("disableDate").StringValue)
            If Now.Subtract(disabledDate).Days &gt; KEEP_DISABLED_DAYS Then
               ShouldExist = False
            End If
         Else
            'Account enabled
            ShouldExist = True
         End If
      End If
   End If
   '' Check if the AD account already exists
   Select Case ADMA.Connectors.Count
      Case 0
         DoesExist = False
      Case 1
         DoesExist = True
      Case Else
         Throw New UnexpectedDataException("Multiple connectors in MA " &amp; ADMA.Name)
   End Select

   '' Generate the expected DN for the user - to use in renaming or moving
   Dim RDN As String = "CN=" &amp; mventry("displayName").StringValue

   If mventry("status").StringValue = "Active" Then
      expectedDN = ADMA.EscapeDNComponent(RDN).Concat(OU_USERS)
   Else
      expectedDN = ADMA.EscapeDNComponent(RDN).Concat(OU_DISABLED)
   End If

   '' Take action based on values of ShouldExist and DoesExist

   If ShouldExist And DoesExist Then
      'Check if account should be renamed or moved
      Dim CSEntry As CSEntry = ADMA.Connectors.ByIndex(0)
      If CSEntry.DN.ToString.ToLower &lt;&gt; expectedDN.ToString.ToLower Then
         CSEntry.DN = expectedDN
      End If

   ElseIf ShouldExist And Not DoesExist Then
      'Provision Account
      &lt;...&gt;

   ElseIf Not ShouldExist And DoesExist Then
      'Deprovision Account
      CSEntry.Deprovision()

   End If
 End Sub</pre>
<h3>Disabling Flow Rules</h3>
<p><a name="Disabling Flow Rules">With</a> these flow rules I disable an AD account and also write a date onto the object (I’m using info but you can use any free attribute) to indicate when it was disabled.</p>
<p>I also flow <em>userAccountControl</em> and info back into the metaverse so I have access to the values in my<br />
metaverse extension code (above).</p>
<p><img src="http://public.bay.livefilestore.com/y1p--wnV_K-shH6tRb6q_v9QW6CK8ju5SvYrGmyGW6MnVhzsHhYziWODyCHvP4kcrnF3HUmReTUud6NEi7hpFdUXw/DP01.jpg" alt="" width="572" height="234" /></p>
<pre lang="x-js">Public Sub MapAttributesForExport(ByVal FlowRuleName As String, ByVal mventry As MVEntry, ByVal csentry As CSEntry) Implements IMASynchronization.MapAttributesForExport

   Const ADS_UF_NORMAL_ACCOUNT As Long = &amp;H200
   Const ADS_UF_ACCOUNTDISABLE As Long = &amp;H2

   Select Case FlowRuleName

      Case "export_userAccountControl"
         Dim currentValue As Long

         If csentry("userAccountControl").IsPresent Then
            currentValue = csentry("userAccountControl").IntegerValue
         Else
            currentValue = ADS_UF_NORMAL_ACCOUNT
         End If

         If mventry("status").IsPresent AndAlso mventry("status").Value = "Active" Then
            ' Enable account
            csentry("userAccountControl").IntegerValue = _
            (currentValue Or ADS_UF_NORMAL_ACCOUNT) And (Not ADS_UF_ACCOUNTDISABLE)

         Else
            ' Disable account
            csentry("userAccountControl").IntegerValue = _
            currentValue Or ADS_UF_ACCOUNTDISABLE
         End If

      Case "export_info"
         If mventry("status").IsPresent AndAlso mventry("status").Value = "Active" _
            AndAlso csentry("info").IsPresent Then
            csentry("info").Delete()
         ElseIf mventry("status").Value = "Inactive" AndAlso _
            Not csentry("info").IsPresent Then
            csentry("info").StringValue = Now.ToString
         End If

      End Select
End Sub</pre>
<h3>XMA Delete Method</h3>
<p><a name="XMA Delete Method">For</a> an MA of type “<em>Extensible Connectivity</em>” you need to write your own routines for the export types<br />
<em>Add</em>, <em>Modify</em> and <em>Delete</em>.</p>
<p>This example shows the <em>Delete</em> step for an XMA which manages home folders for user accounts.</p>
<p>The sub is found in the <em>Connected Data Source Extension</em>.</p>
<p>This example is a very simple deletion of the folder, but you could easily add extra code to, for example, move the folder to an archive location.</p>
<p>(If you want to see an example of the Add method see my blog:<br />
<a href="http://www.wapshere.com/missmiis/creating-user-home-directories-windows-version" target="_blank">Creating Home Directories</a>)</p>
<pre lang="x-js"> Public Sub ExportEntry(ByVal modificationType As ModificationType, ByVal changedAttributes As String(), ByVal csentry As CSEntry) Implements IMAExtensibleCallExport.ExportEntry

If modificationType = Microsoft.MetadirectoryServices.ModificationType.Add Then
' Create the folder

ElseIf modificationType = _
Microsoft.MetadirectoryServices.ModificationType.Delete Then
System.IO.Directory.Delete(csentry("path").StringValue, True)
End If

End Sub</pre>
<h2>About the Author</h2>
<p>Carol Wapshere has been working in IT since 1990, and has since worked in many different organizations, across four different countries. She started out in Netware then moved into Microsoft server products, picking up an assortment of skills in other non-Microsoft systems along the way. She first started working with MIIS in 2005 and loved how it could be used to tie together disparate systems, bringing in much-needed order, and making lots of tedious jobs just disappear.</p>
<p>Thanks to Markus Vilcinskas and Peter Geelen for their help with this document.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/account-deprovisioning-scenarios/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wapshere.com/missmiis/account-deprovisioning-scenarios</feedburner:origLink></item>
		<item>
		<title>Group Management Comparison</title>
		<link>http://feedproxy.google.com/~r/missmiis/~3/Y6-6ZzMuBEs/group-management-comparison</link>
		<comments>http://www.wapshere.com/missmiis/group-management-comparison#comments</comments>
		<pubDate>Thu, 31 Dec 2009 08:34:11 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[FIM 2010]]></category>
		<category><![CDATA[Groups]]></category>
		<category><![CDATA[ILM 2007]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=655</guid>
		<description><![CDATA[Following on from my last post about the overlaps between FIM and Exchange 2010 I wanted to clarify for myself the group management capabilities in FIM, Exchange 2010 and ILM.
Warning: I will have to revisit this post &#8211; as I haven&#8217;t yet installed Exchange 2010 in a production environment the Exchange comments are based on [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from my <a href="http://www.wapshere.com/missmiis/is-there-too-much-overlap-between-fim-2010-and-exchange-2010">last post</a> about the overlaps between FIM and Exchange 2010 I wanted to clarify for myself the group management capabilities in FIM, Exchange 2010 and ILM.</p>
<blockquote><p>Warning: I will have to revisit this post &#8211; as I haven&#8217;t yet installed Exchange 2010 in a production environment the Exchange comments are based on reading rather than hands-on experience, and in particular I&#8217;m unsure about the management of email-enabled Security groups.<br />
<span id="more-655"></span></p></blockquote>
<table border="2">
<thead>
<tr>
<th colspan="4">Exchange Distribution Groups</th>
</tr>
</thead>
<tbody>
<tr>
<td width="10%"> </td>
<td width="30%"><strong>FIM 2010</strong></td>
<td width="30%"><strong>Exchange 2010</strong></td>
<td width="30%"><strong>ILM 2007<br />
or FIM Sync</strong></td>
</tr>
<tr>
<td>Rules based<br />
eg., &#8220;All Finance Dept&#8221;</td>
<td>Managed and populated in FIM Portal.</p>
<ul>
<li>All users must also be represented in FIM Portal.</li>
</ul>
</td>
<td>Dynamic Distribution Lists</td>
<td>External genarator needed<br />
Eg., Group Populator</td>
</tr>
<tr>
<td>Manually populated</td>
<td>Managed and populated in FIM Portal.</p>
<ul>
<li>Owner approval workflow,</li>
<li>Join and approve in Outlook,</li>
<li>Create, join and approve in FIM Portal.</li>
</ul>
</td>
<td>Managed and populated directly in AD</p>
<ul>
<li>Owner approval workflow,</li>
<li>Request and approve in Outlook,</li>
<li>Create in ECP.</li>
</ul>
</td>
<td>No native functionality to permit manual group popluation.<br />
Synchronizes membership lists from one system to another (eg., from a database table to AD).</td>
</tr>
<tr>
<td>Other Management</td>
<td>
<ul>
<li>Manage other attributes, eg., who can send to the list,</li>
<li>Auto-generate new groups, eg., for a new Department or Location (with Workflow development).</li>
</ul>
</td>
<td>Exchange management tools.</td>
<td>Synchronize any attribute, though it must be generated somewhere outside ILM.</td>
</tr>
<tr>
<td>Access Control</td>
<td>Permissions to create, delete, modify granted in FIM Portal only.</td>
<td>Permissions to create, delete, modify granted in AD &#8211; though RBAC simplifies.</td>
<td>N/A</td>
</tr>
</tbody>
</table>
<p> <br />
 </p>
<table border="2">
<thead>
<tr>
<th colspan="4">Security Groups</th>
</tr>
</thead>
<tbody>
<tr>
<td width="10%"> </td>
<td width="30%"><strong>FIM 2010</strong></td>
<td width="30%"><strong>Exchange 2010</strong></td>
<td width="30%"><strong>ILM 2007<br />
or FIM Sync</strong></td>
</tr>
<tr>
<td>Rules based<br />
eg., &#8220;All Finance Dept&#8221;</td>
<td>Populated and managed in FIM Portal.</p>
<ul>
<li>All users must also be represented in FIM Portal.</li>
</ul>
</td>
<td>N/A</td>
<td>External genarator needed<br />
Eg., Group Populator</td>
</tr>
<tr>
<td>Manually populated</td>
<td>Managed and populated in FIM Portal.</p>
<ul>
<li>Owner approval workflow,</li>
<li>Join and approve in Outlook <em>only if the group has an email address</em>,</li>
<li>Create, join and approve in FIM Portal.</li>
</ul>
</td>
<td>Membership management for Security groups with email address?</p>
<p>N/A for non-email emabled Security groups.</td>
<td>No native functionality to permit manual group popluation.<br />
Synchronizes membership lists from one system to another (eg., from a database table to AD).</td>
</tr>
<tr>
<td>Other Management</td>
<td>
<ul>
<li>Replicate the groups to other systems &#8211; not just AD,</li>
<li>Auto-generate new groups, eg., for a new Department or Location (with Workflow development).</li>
</ul>
</td>
<td>Mail-enable existing AD Security groups using Exchange management tools.</td>
<td>Replicate the groups to other systems &#8211; not just AD.</td>
</tr>
<tr>
<td>Access Control</td>
<td>Permissions to create, delete, modify granted in FIM Portal only.</td>
<td>N/A</td>
<td>N/A</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/group-management-comparison/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wapshere.com/missmiis/group-management-comparison</feedburner:origLink></item>
		<item>
		<title>Is there too much overlap between FIM 2010 and Exchange 2010?</title>
		<link>http://feedproxy.google.com/~r/missmiis/~3/SM6kYBzp3dk/is-there-too-much-overlap-between-fim-2010-and-exchange-2010</link>
		<comments>http://www.wapshere.com/missmiis/is-there-too-much-overlap-between-fim-2010-and-exchange-2010#comments</comments>
		<pubDate>Fri, 18 Dec 2009 09:33:58 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Exchange 2010]]></category>
		<category><![CDATA[FIM 2010]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=650</guid>
		<description><![CDATA[I&#8217;ve been getting myself up to speed on the new feaures of Exchange 2010, and some of them look a little familiar&#8230;


The ECP, or Exchange Control Panel, is a web interface where users can perform certain administrative functions such as modifying their own profile and managing Distribution lists they own.
Users can request to join groups [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been getting myself up to speed on the new feaures of Exchange 2010, and some of them look a little familiar&#8230;</p>
<p><span id="more-650"></span></p>
<ul>
<li>The ECP, or Exchange Control Panel, is a web interface where users can perform certain administrative functions such as modifying their own profile and managing Distribution lists they own.</li>
<li>Users can request to join groups which may include an owner-approval workflow.</li>
<li>And finally Role Based Access Control simplifies assigning the right level of permissions &#8211; so intead of making someone an organization-wide Exchange administrator, you can grant more finely-grained permissions, and it&#8217;s based on roles so it should be simpler to apply.</li>
</ul>
<p>So, in one swoop, a number of the key features of FIM look less relevant: the FIM user portal for self-management, the distribution list management and workflows, and the MPRs which give access to other user&#8217;s attributes. Hmmm.</p>
<p>Of course we get a lot more with FIM, and it&#8217;s a generalised platform, as opposed to being targeted specifically at Exchange-enabled objects. Also one can make the argument that it&#8217;s more secure to make modfications outside of AD and then sync them across in a controlled way, rather than giving people access directly into AD. And finally FIM gives us password reset&#8230;</p>
<p>But considering the expected cost of FIM CALs, how many IT decision makers will look at FIM and decide it doesn&#8217;t give them enough over what they&#8217;re going to be getting anyway with Exchange 2010?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/is-there-too-much-overlap-between-fim-2010-and-exchange-2010/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wapshere.com/missmiis/is-there-too-much-overlap-between-fim-2010-and-exchange-2010</feedburner:origLink></item>
		<item>
		<title>Five things about MPRs</title>
		<link>http://feedproxy.google.com/~r/missmiis/~3/d8H279VYMm0/five-things-about-mprs</link>
		<comments>http://www.wapshere.com/missmiis/five-things-about-mprs#comments</comments>
		<pubDate>Sun, 13 Dec 2009 07:53:50 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[FIM 2010]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=634</guid>
		<description><![CDATA[Next in my &#8220;Five things about FIM&#8221; posts &#8211; five things I have learnt about Management Policy Rules.

They give permissions, to a Set or referentially
The first thing I understood about MPRs is that they give permissions within the FIM Portal environment. There are various MPRs that come pre-configured to give permissions to the Administrator, the Built-In Sync Account, [...]]]></description>
			<content:encoded><![CDATA[<p>Next in my &#8220;Five things about FIM&#8221; posts &#8211; five things I have learnt about Management Policy Rules.</p>
<p><span id="more-634"></span></p>
<h3>They give permissions, to a Set or referentially</h3>
<p>The first thing I understood about MPRs is that they give permissions within the FIM Portal environment. There are various MPRs that come pre-configured to give permissions to the Administrator, the Built-In Sync Account, and Portal users &#8211; and a number of them have to be enabled before you can get going.</p>
<p>Permissions may be granted to Sets, where a Set is a group that exists solely within the Portal. You can&#8217;t specify a single user here, but I think most people would agree it&#8217;s better to grant permissions to groups instead of individial users - even if this means creating a set with a single member.</p>
<p>Permissions may also be granted referentially, where you choose an attribute of the person currently making the request through the Portal, and apply permissions to that. The attribute selected would have to be the Reference data type, such as:</p>
<ul>
<li>ResourceID &#8211; permission granted to the person to act upon their own profile,</li>
<li>Manager &#8211; permission granted to the person&#8217;s manager,</li>
<li>Assistant &#8211; permission granted to the person&#8217;s assistant.</li>
</ul>
<h3>The rights change straight away</h3>
<p>I really like the way permission changes are applied immediately, and without any need for an iisreset.</p>
<p>And I particulary like the way the View and Edit forms change accordingly &#8211; attribute names are removed from the view of users with no rights to them. Unfortunately this is not the case for the Create forms, where the only way you can completely remove a field is by editing the underlying XML. (I asked about this on connect and was told the Create forms will self-modify in a future release.)</p>
<h3>Rights are cumulative and there&#8217;s no &#8220;Deny&#8221;</h3>
<p>Still on the permissions side of MPRs &#8211; you can only give rights, you can&#8217;t block them. All permissions are assumed to be <em>not</em> allowed unless explicitly granted.</p>
<p>The lack of Deny is probably a very good thing as we could easily end up with multiple MPRs applying to a user. At least this way we only have to worry about the permissions that have been granted, without the possible complication of over-riding denials.</p>
<h3>They also trigger Workflows</h3>
<p>As well as applying permissions, MPRs trigger Workflows. Some MPRs just grant permissions, some just trigger workflows, and some do both.</p>
<p>At first I found this hard to understand, because permissions and workflows are completely different things. But after creating a few it&#8217;s starting to make more sense. It means that you tailor your MPRs to specific events you expect to happen, such as:</p>
<ul>
<li>When the Built-In Sync Account imports a new person object from the Sync Service (with permission to do this) a workflow should run to generate some extra attributes (tack on an Action workflow).</li>
<li>When a user requests an account for a contractor (with permission) seek approval from their manager, and then generate some extra attributes (tack on an AuthZ and an Action workflow).</li>
</ul>
<p>MPRs can also trigger workflows because a value changed. In some MPRs this can be any change; in others the change causes the object to move from one Set to another. So perhaps the Department changed, causing the person to move from the &#8220;All People in HR&#8221; set to the &#8220;All People NOT in HR&#8221; set. (When you create a Set for MPRs, you usually have to create the opposite Set as well.)</p>
<h3>I worry about keeping track of them</h3>
<p>You can call an MPR whatever you like, which of course means you are free to be as tidy or as messy as you like. As I&#8217;m yet to play with FIM in anything other that a test environment I have no idea what it will look like with a couple of hundred MPRs defined. Clear naming for searchability and ongoing management will be important.</p>
<p>What I would really like is a utility that shows you all the MPRs that apply to an object &#8211; something like this will be invaluable in troubleshooting, especially if it wasn&#8217;t you that built the system. Perhaps someone far cleverer than me will write something along these lines.</p>
<p>&#8230; UPDATE: and it looks like someone has already done exactly that and I hadn&#8217;t noticed! One of <a href="http://blogs.dirteam.com/blogs/jorge/archive/2009/12/11/experiences-and-or-differences-with-fim2010-rc1-so-far-part-2.aspx">Jorge&#8217;s very informative posts</a> today has pointed out the new Explore option which should help with this. I&#8217;ll have to have a play next time my lab is fired up.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/five-things-about-mprs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wapshere.com/missmiis/five-things-about-mprs</feedburner:origLink></item>
		<item>
		<title>Five things about the FIM Portal</title>
		<link>http://feedproxy.google.com/~r/missmiis/~3/6RrV9th4NMg/five-things-about-the-fim-service</link>
		<comments>http://www.wapshere.com/missmiis/five-things-about-the-fim-service#comments</comments>
		<pubDate>Sat, 05 Dec 2009 09:19:52 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[FIM 2010]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=623</guid>
		<description><![CDATA[I&#8217;m having a big FIM week this week &#8211; in fact it&#8217;s more like a FIM Fortnight! I&#8217;ve delivered a three day training, demonstrated the product to a client, and I&#8217;m presenting FIM at a half-day seminar next week. (See here if you happen to be in Vaud, CH and you&#8217;d like to come.)
So while [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m having a big FIM week this week &#8211; in fact it&#8217;s more like a FIM Fortnight! I&#8217;ve delivered a three day training, demonstrated the product to a client, and I&#8217;m presenting FIM at a half-day seminar next week. (See <a href="http://www.lanexpert.ch/default.aspx?tabid=26&amp;itemID=56">here</a> if you happen to be in Vaud, CH and you&#8217;d like to come.)</p>
<p>So while I&#8217;m doing and thinking all things FIM I&#8217;ve decided to start a little &#8220;Five things about&#8221; blog series on different aspects of the new platform. To start &#8211; some generalities about the FIM Portal (aka All The New Sharepointy Stuff).</p>
<p><span id="more-623"></span></p>
<h3>1. It&#8217;s a framework</h3>
<p>I have always told people that ILM is a <em>framework,</em> instead of a complete OOB solution. And then, before their eyes completely glazed over, I have attempted to impress on them that this is a Good Thing! IdM is an inherently complex problem, with every organisation having their own perculiarities, and I firmly believe that workable IdM must be <em>grown</em> into the environment, preferably in a standards-based, manageable way.</p>
<p>ILM always ticked these boxes for me and now, with FIM, Microsoft have extended the notion to the Portal. Essentially we have a new framework for defining the schema, workflows, permissions and data-entry points. RC1 comes with a schema and a starter collection of policies, sets and workflows &#8211; but you are free to view these as <em>suggestions</em> which you may change or build upon.</p>
<h3>2. Sequential processing</h3>
<p>Those of us who work with ILM have come to think in its &#8220;steady-state&#8221; way, where all we care about is the state of the data right now. The Portal operates in a sequential way, and I had to get used to it.</p>
<p>I was following <a href="http://blogs.dirteam.com/blogs/jorge/archive/2009/11/12/fim-2010-not-not-is-empty-and-not-equal-i-think.aspx">Jorge&#8217;s method</a> to get around the lack of an &#8220;IsPresent&#8221; qualifier when I realised I didn&#8217;t actually need it. We had made a very simple form to request a user account through the web services and I wanted to use a workflow to generate system-type attributes such as Account Name, Display Name and Employee ID. My immediate thought was to make a set of &#8220;Account Name not present&#8221; but that&#8217;s an ILM way of thinking &#8211; ie just look at the data now.</p>
<p>The FIM Portal way is to think about <em>where the data came from</em>. In this case it was the account I&#8217;d created for the web service. I modified the MPR that gave rights to the service account, and now it also runs the Workflow that generates the attributes. Obvious in retrospect, but it did make me realise I had to adopt a more sequential way of thinking for the Portal.</p>
<h3>3. The WS-* thing really is a big deal</h3>
<p>I&#8217;ve heard a lot about the web services interface to the Portal but, not being a developer, I&#8217;d filed it under &#8220;find out more later&#8221;. But now I&#8217;ve had the chance to work with a developer colleague for a couple of days and have seen how excited he is about the possibilities.</p>
<p>With RC1 he did have some tedious mucking about with library versions first (something about an x64/x32 conflict &#8211; don&#8217;t ask me more), but once that was sorted he showed me how simple the code is.</p>
<p>I started to think about how important it is that we&#8217;re not being tied to the Portal interface to use it. Many organisations will already have existing portals where people are accustomed to find data and make requests &#8211; this way those interfaces can be modified to access the Portal at the back-end, and users don&#8217;t need to worry about learning something different.</p>
<h3>4. It is distinct from the sync service, and that is fine</h3>
<p>I have been told that I should consider the metaverse and the data in the Portal as the same thing &#8211; but they&#8217;re not, and actually I don&#8217;t see that as a problem. The Sync Service is a distinct unit and, for it, the FIM Portal is just another connected data source. I am very comfortable with the idea of preparing my data in the Portal and then, when it is ready, sync&#8217;ing it through the Sync Service.</p>
<p>This has also led me to the decision that I won&#8217;t be using the Portal-based Sync Rules, at least for the first release. I do have concerns about performance and troubleshooting which have not been allayed but what I see in RC1 but, more fundamentally than that, I want to keep the configuration of the Sync Service within the Sync Service.</p>
<p>Partly it is to do with seperating the part of the product that is mature and stable, from the part of the product that is completely new. Many people I talk to are interested, but concerned about adopting a &#8220;version one&#8221; product. I am hoping that the product being only &#8221;half new&#8221; will seem like an acceptable risk. I need to be able to guarantee that the half which isn&#8217;t new will perform without problems.</p>
<h3>5. All Resources are treated in similar ways</h3>
<p>Resources are just objects that exist within the Portal. These are users and groups, but also the things that make up the functionality of the Portal &#8211; like Workflow Activities, and Requests, and MPRs.</p>
<p>Because they&#8217;re all just Resources, the methods for interacting with them are repeatable. So when I wanted to give the Administrator account access to add a new workflow activity, I followed exactly the same process as giving a user the permission to create a group. If I want to change a form, or add a new attribute, it will be the same process for any resource type. This reapplication of methods should certainly make the Portal easier to learn!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/five-things-about-the-fim-service/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wapshere.com/missmiis/five-things-about-the-fim-service</feedburner:origLink></item>
		<item>
		<title>Managing Exchange 2000/2003/2007 with ILM 2007</title>
		<link>http://feedproxy.google.com/~r/missmiis/~3/gvzbZxvd4EE/managing-exchange-200020032007-with-ilm-2007</link>
		<comments>http://www.wapshere.com/missmiis/managing-exchange-200020032007-with-ilm-2007#comments</comments>
		<pubDate>Sun, 08 Nov 2009 14:23:51 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Exchange 2003]]></category>
		<category><![CDATA[Exchange 2007]]></category>
		<category><![CDATA[ILM 2007]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=579</guid>
		<description><![CDATA[I have just posted this article in the Greatest Hits series on the ILM Technet forum.
http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/f8ad045d-7252-4cd1-a189-d704a8f99129
The article covers various management tasks you can acheive with the standard AD MA, including provisioning and updating of users, mailboxes, contacts and distribution groups. There are quite a few code samples as well.
Managing Exchange 2000/2003/2007 with ILM 2007
This article covers [...]]]></description>
			<content:encoded><![CDATA[<p>I have just posted this article in the Greatest Hits series on the ILM Technet forum.</p>
<p><a href="http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/f8ad045d-7252-4cd1-a189-d704a8f99129">http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/f8ad045d-7252-4cd1-a189-d704a8f99129</a></p>
<p>The article covers various management tasks you can acheive with the standard AD MA, including provisioning and updating of users, mailboxes, contacts and distribution groups. There are quite a few code samples as well.<span id="more-579"></span></p>
<h2>Managing Exchange 2000/2003/2007 with ILM 2007</h2>
<p>This article covers the management of Exchange-enabled objects using the native Active Directory Management Agent that is included with ILM 2007 FP1.</p>
<p>The managed object types discussed are Users, Contacts, Groups and Dynamic Distribution Lists. The article also covers the special cases of adding mailboxes to existing accounts, and supporting a Resource Forest. Where extra steps are required for Exchange 2007 this has been highlighted.</p>
<p>It is assumed that the reader is comfortable with the concepts of Provisioning code and Advanced attribute flow rules.</p>
<h2 style="color: #365f91;">Permissions</h2>
<p>The service account used in the connection properties of the Management Agent must have sufficient rights to execute the required changes in AD.</p>
<p>Typically a Domain Admin account will be used, but if this is not permitted in your environment you will need to do some testing. The minimum permissions required are:</p>
<ul>
<li><a href="http://support.microsoft.com/kb/303972">Replicate Directory Changes</a></li>
<li>Rights to create/delete/modify objects in the specific OUs</li>
<li>Exchange Administrator (2003) or Exchange Recipient Administrator (2007)</li>
</ul>
<p> </p>
<h2 style="color: #365f91;">Users</h2>
<h3 style="color: #365f91;">Provisioning Mail Users</h3>
<h4 style="color: #365f91;">Exchange 2000/2003</h4>
<p>Provisioning a mail user is most simply done using the <a href="http://msdn.microsoft.com/en-us/library/ms696038(VS.85).aspx">CreateMailbox</a> method of the <a href="http://msdn.microsoft.com/en-us/library/ms696074(VS.85).aspx">ExchangeUtils</a> class. This method will create a new user account, and populate the necessary mail attributes for you.</p>
<p>See the code sample <span style="text-decoration: underline;">Create a User with a Mailbox</span> at the end of this document for an example of the provisioning code.</p>
<h4 style="color: #365f91;">Mixed Exchange 2003 and 2007</h4>
<p>In a mixed environment the RUS still runs so Exchange 2003 methods may be used. Make sure that you do <strong>not</strong> tick the “Enable Exchange 2007 provisioning” box in the Management Agent configuration.</p>
<h4 style="color: #365f91;">Exchange 2007</h4>
<p>The same code will work when provisioning to Exchange 2007, however there are some extra requirements for the ILM server:</p>
<ul>
<li>ILM 2007 FP1 or later</li>
<li>Powershell</li>
<li>Exchange 2007 Management Tools</li>
<li>Latest rollup packs on Exchange and ILM servers</li>
</ul>
<p>In addition you must tick Enable Exchange 2007 provisioning on the Extensions tab of the Management Agent.</p>
<h4 style="color: #365f91;">Adding a Mailbox to an existing User</h4>
<p>Sometimes you may need to create a mailbox for an existing account. As the account already exists this is not actually a provisioning task, and is therefore handled with export flow rules.</p>
<p>All you need to do is to populate the following attributes, in addition to the basic user attributes:</p>
<ul>
<li>displayName – if not already set</li>
<li>mailNickname – with the local part of the email address (the bit before the “@”)</li>
<li>homeMDB – with the DN of the mail store</li>
<li>mDBUseDefaults – set to “True” to use the default quota settings</li>
</ul>
<p> </p>
<h3 style="color: #365f91;">Special Mailbox Types</h3>
<p>Exchange 2007 includes some extra mailbox types:</p>
<ul>
<li>Room Mailbox,</li>
<li>Equipment Mailbox,</li>
<li>Linked Mailbox.</li>
</ul>
<p>The Linked Mailbox is covered in the <span style="text-decoration: underline;">Resource Forest</span> section below.</p>
<p>The Room and Equipment mailboxes are currently not supported by ILM 2007 provisioning. The only reliable method is to create a User Mailbox using ILM 2007, and then use the set-mailbox cmdlet to change the mailbox type.</p>
<h4 style="color: #365f91;">Troubleshooting</h4>
<h5 style="color: #365f91;">Export Errors</h5>
<p>The most common problems with provisioning Exchange users will relate to permissions. Make sure that the account used by the MA to connect to AD has permission to create Exchange users. Also make sure you have the latest service packs and rollups on the Exchange and ILM servers – at least SP1 RU9.</p>
<h5 style="color: #365f91;">Where’s the Mailbox?</h5>
<p>Exchange does not create the actual mailbox until it is opened or something is sent to it, therefore it is completely normal for no new mailboxes to be listed directly after the ILM export.</p>
<p>To confirm if the user is really mail-enabled:</p>
<ul>
<li>In Exchange 2003, check that the user’s Exchange tabs have appeared in the Exchange-enhanced version of AD Users &amp; Computers.</li>
<li>In Exchange 2007, use the get-user cmdlet to confirm the user’s object type is “UserMailbox”, or check that they appear as a Recipient in the Management Console.</li>
</ul>
<p> </p>
<h5 style="color: #365f91;">Exchange 2007 and Global Catalog targeting</h5>
<p>There is a known problem with Exchange 2007 provisioning and AD replication delays. On the MA’s Configure Directory Partitions tab you can hard-code the name of a preferred domain controller. Enter the name of the nearest Global Catalog to ensure that both the user creation and the mailbox creation are performed in the same place.</p>
<table style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<th style="text-align: left; background-color: #c0c0c0;"><img src="http://apfhrw.bay.livefilestore.com/y1pCed6u9dxDV3LOdzgtYt8xFaDWmIf_thMiOiFb3SmUARdxwIei5b6sPCHGruZWYphrJEU8j2BZEd51ZoAkp_ONkG8moMODvLC/Note.gif" alt="note" />Note</th>
</tr>
<tr>
<td style="background-color: #f0f0f0;">Use the Resource Kit utility nltest to find Global Catalog servers:<br />
<em>nltest /DSGETDC:mydomain.com /GC</em></td>
</tr>
</tbody>
</table>
<p> </p>
<h3 style="color: #365f91;">Modifying Mail Users</h3>
<p>You can change a user’s Exchange related attributes using export flow rules.</p>
<p>The following table is not exhaustive. If you wish to automate an Exchange modification the best thing to do is make the change manually and then inspect the attribute changes using ADSIEdit.<br />
In this way you can discover which attributes you need to create flow rules for, and the types of value you should flow.</p>
<table border="0">
<tbody>
<tr>
<th style="text-align: center; background-color: #d4d0c8; padding-left: 5px; padding-right: 5px; font-weight: bold;">Attribute</th>
<th style="text-align: center; background-color: #d4d0c8; padding-left: 5px; padding-right: 5px; font-weight: bold;">Function</th>
<th style="text-align: center; background-color: #d4d0c8; padding-left: 5px; padding-right: 5px; font-weight: bold;">Comments</th>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">altRecipient</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Used in forwarding – the DN or the mail-enabled object to forward all mail to.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">When forwarding mail to an external account you must create a Contact object in this Exchange organization.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">deliverAndRedirect</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">If forwarding is enabled, set to TRUE to deliver to both the mailbox and the forwarding address.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Use in combination with altRecipient.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">extensionAttributen</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Free-use string attributes where you can store any data you like.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Be consistent. If extensionAttribute4 is being used for star sign, then make sure it is only ever used for that.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">homeMDB</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Location of the mailbox.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Do NOT change once it has been set. If you need to move the mailbox use Exchange admin utilities.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">mail</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The user’s primary email address.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">If changing the address you should also change mailNickname and the “SMTP:” value of proxyAddresses.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">mailNickname</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">This should match the local part of the primary email address.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">mDBUseDefaults</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Use the default quota for the mail store.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Set to False if setting an individual limit.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">mDBStorageQuota</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The “Warning” limit Expressed in Kbytes.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">mDBOverQuotaLimit</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The “Block Send” limit Expressed in Kbytes.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">mDBOverHardQuotaLimit</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The “Block Send &amp; Receive” limit</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Expressed in Kbytes.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">msExchHideFromAddressLists</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Set to “True” to hide from the GAL.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">msExchMailboxGuid</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The unique identifier of the mailbox</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">DON’T CHANGE THIS! It can be useful to flow this back into the Metaverse if you need to test that the mailbox was created.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">proxyAddresses</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Multivalue attribute holding all possible email addresses for this account</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The capital “SMTP:” address is the primary. The other “smtp:” addresses act as aliases.</td>
</tr>
</tbody>
</table>
<p> </p>
<h3 style="color: #365f91;">Resource Forest</h3>
<p>In a Resource Forest scenario the following accounts are needed:</p>
<ol>
<li>An enabled user account in the Account Forest.</li>
<li>A disabled account in the Resource Forest with an attached mailbox.</li>
</ol>
<p>The account creation in the two forests and the mailbox linking are simple enough to achieve with ILM. A provisioning code sample has been included at the end of this document under <span style="text-decoration: underline;">Create Account Forest and Resource Forest Accounts</span>.</p>
<p>The difficulty comes with the permissions assignment piece of the puzzle – it is necessary for the user’s account to have the <strong>Full Access</strong> and <strong>Send As</strong> rights to the mailbox. This is not something that is possible with the native Active Directory MA.</p>
<p>While there are several ways to solve the permissions-assignment problem, the typical way is to run a script after the export step. The script might simply trawl AD looking for accounts to update or it could read details from the ILM export log and target the new accounts.</p>
<p>While outside the scope of this document, the following resources have been included for reference:</p>
<ol>
<li>A <a href="http://support.microsoft.com/kb/310866/en-us">Microsoft technote</a> showing how to Script Exchange 2000/2003 mailbox permissions,</li>
<li>A PowerShell script for Exchange 2007 has been included in the Code section at the end of this article.</li>
</ol>
<p> </p>
<h2 style="color: #365f91;">Contacts</h2>
<p>Contacts are used for two primary functions in Exchange, both of which can be automated with ILM:</p>
<ol>
<li>Adding organization-wide contacts to the Global Address List.<br />
ILM could be used to import information from a CRM system and automatically create the contact object.</li>
<li>As a way to forward mail from a mailbox within the organization.<br />
Some organizations (such as universities) allow users to forward their mail to another address. As long as ILM has the information about the forwarding request (perhaps entered by the user in a self-service portal) it can be configured to create the contact and set up the forwarding.</li>
</ol>
<h3 style="color: #365f91;">Provisioning</h3>
<p>Contacts may be provisioned very simply using the <a href="http://msdn.microsoft.com/en-us/library/ms696036(VS.85).aspx">CreateMailEnabledContact</a> method from the ExchangeUtils class.<br />
See the code sample <span style="text-decoration: underline;">Create a Contact</span> at the end of this document for an example of the provisioning code.</p>
<h3 style="color: #365f91;">Modifying</h3>
<table border="0">
<tbody>
<tr>
<th style="text-align: center; background-color: #d4d0c8; padding-left: 5px; padding-right: 5px; font-weight: bold;">Attribute</th>
<th style="text-align: center; background-color: #d4d0c8; padding-left: 5px; padding-right: 5px; font-weight: bold;">Function</th>
<th style="text-align: center; background-color: #d4d0c8; padding-left: 5px; padding-right: 5px; font-weight: bold;">Comments</th>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">mail</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The contact’s email address.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">If changing the address you should also change targetAddress and the “SMTP:” value of proxyAddresses.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">msExchHideFromAddressLists</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Set to “True” to hide from the GAL.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;"> </td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">proxyAddresses</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">Multivalue attribute holding all possible email addresses that will forward via the contact.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">To work the contact needs an alias using “smtp:” in the local domain. The “SMTP:” address should match mail and targetAddress.</td>
</tr>
<tr>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">targetAddress</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">The email address that mail sent to this contact will be forwarded to.</td>
<td style="text-align: left; padding-left: 5px; padding-right: 5px;">One address only.</td>
</tr>
</tbody>
</table>
<p> </p>
<h2 style="color: #365f91;">Distribution List</h2>
<p>There are three types of Distribution list in Exchange:</p>
<ol>
<li>Groups of type Distribution</li>
<li>Groups of type Security that have an email address</li>
<li>Dynamic distribution lists.</li>
</ol>
<p>All three types can be created and managed with ILM, but the processes will differ.</p>
<h3 style="color: #365f91;">Distribution Groups</h3>
<p>To provision a standard Distribution Group use the <a href="http://msdn.microsoft.com/en-us/library/ms696024(VS.85).aspx">CreateDistributionList</a> method of the <a href="http://msdn.microsoft.com/en-us/library/ms696074(VS.85).aspx">ExchangeUtils</a> class. See <span style="text-decoration: underline;">Create a Distribution List</span> at the end of this document for a code sample.</p>
<p>The main modification you will do with groups is to update the membership list. Group population is outside the scope of this document, though it is worth looking into Group Populator and Multi-Value tables.</p>
<h3 style="color: #365f91;">Security Groups with Email Address</h3>
<p>It is possible to mail-enable a Security group, allowing it to then also act as a distribution list.</p>
<p>Provisioning such a group is a simple matter of creating a security group and adding the mail address. See <span style="text-decoration: underline;">Create a Mail-Enabled Security Group</span> under Code Samples at the end of this document.</p>
<h3 style="color: #365f91;">Dynamic Distribution Lists</h3>
<p>You may also use ILM to provision Dynamic Distribution Lists. All you need to do is to create an object of type msExchDynamicDistributionList and add values to the following attributes:</p>
<ul>
<li>displayName</li>
<li>mailNickname</li>
<li>msExchDynamicDLFilter</li>
<li>msExchDynamicDLBaseDN</li>
</ul>
<p>See <span style="text-decoration: underline;">Create a Dynamic Distribution List</span> under Code Samples at the end of this document.</p>
<h2 style="color: #365f91;">Code Samples</h2>
<h3 style="color: #365f91;">Create a User with a Mailbox</h3>
<p> </p>
<p>This MVExtension code is in addition to export flow rules to the user object type on the following attributes:</p>
<ul>
<li>displayName</li>
<li>givenName</li>
<li>sAMAccountName</li>
<li>sn</li>
<li>userPrincipalName</li>
</ul>
<p> </p>
<pre>Public Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision

  Const ADS_UF_NORMAL_ACCOUNT As Integer = &amp;H200

  Dim csentry As CSEntry

  Dim MA As ConnectedMA

  Dim dn As ReferenceValue

  Dim rdn As String

  Dim homeMDB As String

  Dim mailNickname As String

  Dim mail As String

  Select Case mventry.ObjectType

  Case "person"

    MA = mventry.ConnectedMAs("MYDOMAIN")

    If &lt;test that account should exist&gt; AndAlso MA.Connectors.Count = 0 Then

      rdn = "CN=" &amp; mventry("sn").Value &amp; ", " &amp; mventry("givenName").Value

      dn = MA.EscapeDNComponent(rdn).Concat("OU=Users,OU=MyOrg, " _

                                            &amp; "dc=mydomain,dc=local")

      mailNickname = mventry("mailNickname").Value

      ' The following line assumes MDB, SG and MailServer have been

      ' populated for the user in the Metaverse.

      homeMDB = "CN=&amp; mventry("MDB").StringValue _

         &amp; ",CN=" &amp; mventry("SG").StringValue _

         &amp; ",CN=InformationStore,CN=" &amp; mventry("MailServer").StringValue _

         &amp; ",CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT)" _

         &amp; ",CN=Administrative Groups,CN=First Organization" _

         &amp; ",CN=Microsoft Exchange,CN=Services,CN=Configuration" _

         &amp; ",DC=mydomain,DC=local"  

      csentry = ExchangeUtils.CreateMailbox(MA, dn, mailNickname, homeMDB)

      csentry.DN = dn

      csentry("unicodePwd").Values.Add("FirstP@ssw0rd")

      csentry("userAccountControl").IntegerValue = ADS_UF_NORMAL_ACCOUNT

      csentry.CommitNewConnector()

    End If

  End Select

End Sub</pre>
<p> </p>
<h3 style="color: #365f91;">Create Account Forest Accounts and Resource Forest Accounts</h3>
<p> </p>
<pre>Public Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision

  Const ADS_UF_NORMAL_ACCOUNT As Integer = &amp;H200

  Dim csentry As CSEntry

  Dim MA As ConnectedMA

  Dim dn As ReferenceValue

  Dim rdn As String

  Dim homeMDB As String

  Dim mailNickname As String

  Dim mail As String

  Select Case mventry.ObjectType

  Case "person"

    'Create Account Forest account - no mailbox

    MA = mventry.ConnectedMAs("AccountForest")

    If MA.Connectors.Count = 0 Then

      rdn = "CN=" &amp; mventry("sn").StringValue _

                  &amp; ", " &amp; mventry("givenName").StringValue

      dn = MA.EscapeDNComponent(rdn).Concat("OU=Users,OU=MyOrg, " _

                                            &amp; "dc=accountdomain,dc=local")

      csentry = MA.Connectors.StartNewConnector("user")

      csentry.DN = dn

      csentry("unicodePwd").Values.Add("FirstP@ssw0rd")

      csentry("userAccountControl").IntegerValue = ADS_UF_NORMAL_ACCOUNT

      csentry.CommitNewConnector()

    End If

    'Create disabled account and mailbox in Resource forest. 

    '  This can only be done once the objectSID from the account domain 

    '  is available. Create a metaverse Binary attribute called SID

    '  and flow objectSid -&gt; SID.

    '  The account is disabled because no password is set. Alternatively set

    '  a random password and disable using userAccountControl.

    MA = mventry.ConnectedMAs("ResourceForest")

    If MA.Connectors.Count = 0 AndAlso mventry("SID").IsPresent Then

      rdn = "CN=" &amp; mventry("displayName").StringValue

      dn = MA.EscapeDNComponent(rdn).Concat("OU=LinkedMailboxes,OU=MyOrg, " _

                                            &amp; "dc=resourcedomain,dc=local")

      mailNickname = mventry("mailNickname").StringValue

      homeMDB = "CN=" &amp; mventry("MDB").StringValue _

         &amp; ",CN=" &amp; mventry("SG").StringValue _

         &amp; ",CN=InformationStore,CN=" &amp; mventry("MailServer").StringValue _

         &amp; ",CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT)" _

         &amp; ",CN=Administrative Groups,CN=First Organization" _

         &amp; ",CN=Microsoft Exchange,CN=Services,CN=Configuration" _

         &amp; ",DC=mydomain,DC=local"  

      csentry = ExchangeUtils.CreateMailbox(MA, dn, mailNickname, homeMDB)

      csentry.DN = dn

      csentry("msExchMasterAccountSid").BinaryValue = mventry("SID").BinaryValue

      'The following setting is optional but can help with tracking the mailbox user.

       csentry("extensionAttribute1").Value = "accountdomain\" _

                                              &amp; mventry("uid").StringValue

       csentry.CommitNewConnector()

     End If

  End Select

End Sub</pre>
<p> </p>
<h3 style="color: #365f91;">Assign Resource Mailbox Permissions – Exchange 2007, powershell</h3>
<p> </p>
<p>The following script assigns the FullAccess and SendAs permissions to a resource forest mailbox.<br />
The resource forest account needs to have the domain\username of the user’s actual account written to extensionAttribute1, as per the provisioning code above.</p>
<pre>$Filter = "(&amp;(ObjectCategory=user)(extensionAttribute1=*))"

$Searcher = New-Object System.DirectoryServices.DirectorySearcher($Filter)

$Searcher.Findall() | Foreach-Object -Process {

$alias = [string]$_.properties.item("mailNickname")

$user = [string]$_.properties.item("extensionAttribute1")

Add-MailboxPermission -Identity $alias -AccessRights FullAccess, SendAs -User $user

}</pre>
<p> </p>
<h3 style="color: #365f91;">Create a Contact</h3>
<p> </p>
<pre>Public Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision

  Dim csentry As CSEntry

  Dim MA As ConnectedMA

  Dim dn As ReferenceValue

  Dim rdn As String

  Dim mailNickname As String

  Dim mail As String

  Select Case mventry.ObjectType

  Case "person"

     MA = mventry.ConnectedMAs("MYDOMAIN")

     If MA.Connectors.Count = 0 Then

       rdn = "CN=" &amp; mventry("displayName").StringValue

       dn = MA.EscapeDNComponent(rdn).Concat("OU=Contacts,OU=MyOrg, " _

                                            &amp; "dc=mydomain,dc=local")

       mail = mventry("mail").StringValue

       'The mailNickname is only for internal Exchange purposes.

       'You could just as easily use an id number from the source data.

       mailNickname = mventry("mail").Value.Split("@")(0)

       csentry = ExchangeUtils.CreateMailEnabledContact(MA, dn, mailNickname, mail)

       csentry.DN = dn

       csentry.CommitNewConnector()

    End If

  End Select

End Sub</pre>
<p> </p>
<h3 style="color: #365f91;">Create a Distribution List</h3>
<p> </p>
<pre>Public Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision

  Dim csentry As CSEntry

  Dim MA As ConnectedMA

  Dim dn As ReferenceValue

  Dim rdn As String

  Dim mailNickname As String

  Dim mail As String

  Select Case mventry.ObjectType

  Case "group"

    MA = mventry.ConnectedMAs("MYDOMAIN")

    If MA.Connectors.Count = 0 Then

      rdn = "CN=" &amp; mventry("cn").StringValue

      dn = MA.EscapeDNComponent(rdn).Concat("OU=Groups,OU=MyOrg, " _

                                            &amp;"dc=mydomain,dc=local")

      mailNickname = mventry("mailNickname").StringValue

      csentry = ExchangeUtils.CreateDistributionlist(MA, dn, mailNickname)

      csentry.DN = dn

      csentry.CommitNewConnector()

    End If

  End Select

End Sub</pre>
<p> </p>
<h3 style="color: #365f91;">Create a Mail-Enabled Security Group</h3>
<p> </p>
<pre>Public Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision

  Dim csentry As CSEntry

  Dim MA As ConnectedMA

  Dim dn As ReferenceValue

  Dim rdn As String

  Dim mailNickname As String

  Dim mail As String

  Select Case mventry.ObjectType

  Case "group"

    MA = mventry.ConnectedMAs("MYDOMAIN")

    If MA.Connectors.Count = 0 Then

      rdn = "CN=" &amp; mventry("cn").StringValue

      dn = MA.EscapeDNComponent(rdn).Concat("OU=Groups,OU=MyOrg, " _

                                            &amp; "dc=mydomain,dc=local")

      mailNickname = mventry("mailNickname").StringValue

      csentry = MA.Connectors.StartNewConnector("group")

      csentry("groupType").Value = -2147483640  'Universal Security

      csentry("displayName").Value = mventry("cn").StringValue

      csentry("mailNickname").Value = mailNickname

      csentry.DN = dn

      csentry.CommitNewConnector()

    End If

  End Select

End Sub</pre>
<p> </p>
<h3 style="color: #365f91;">Create a Dynamic Distribution List</h3>
<p> </p>
<p>This MVExtension code snippet creates Department DDLs.<br />
The department names have been imported into department objects in the Metaverse.<br />
The users’ department attribute matches exactly the department names.</p>
<pre>Public Sub Provision(ByVal mventry As MVEntry) Implements IMVSynchronization.Provision

  Dim csentry As CSEntry

  Dim MA As ConnectedMA

  Dim dn As ReferenceValue

  Dim rdn As String

  Dim mailNickname As String

  Dim mail As String

  Select Case mventry.ObjectType

  Case "department"

    MA = mventry.ConnectedMAs("MYDOMAIN")

    If MA.Connectors.Count = 0 Then

      rdn = "CN=" &amp; mventry("cn").StringValue

      dn = MA.EscapeDNComponent(rdn).Concat("OU=DDLs,OU=MyOrg, " _

                                            &amp; "dc=mydomain,dc=local")

      mailNickname = mventry("mailNickname").StringValue

      csentry = MA.Connectors.StartNewConnector("msExchDynamicDistributionList")

      csentry.DN = dn

      csentry("displayName").Value = mventry("cn").StringValue

      csentry("mailNickname").Value = mailNickname

      'The following filter selects users whose department equals the DDL cn

      csentry("msExchDynamicDLFilter").Value = "(&amp;(!cn=SystemMailbox{*})" _

         &amp; "(&amp;(&amp;(&amp;(&amp; (mailnickname=*)" _ 

         &amp; "(| (&amp;(objectCategory=person)(objectClass=user)" _

         &amp; "(|(homeMDB=*)(msExchHomeServerName=*))) )))" _

         &amp; "(objectCategory=user)(department=" _

         &amp; mventry("cn").StringValue &amp; "))))"

      csentry("msExchDynamicDLBaseDN").Value = "OU=Groups,OU=MyOrg, " _

                                            &amp; "dc=mydomain,dc=local"

      csentry.CommitNewConnector()

    End If

  End Select

End Sub</pre>
<p> </p>
<h2 style="color: #365f91;">ILM Forum Threads</h2>
<ul>
<li><a href="http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/be387815-89ef-40cc-b063-91c9a5cb0e69/">Provisioning Exchange 2007 with ILM 2007</a></li>
<li><a href="http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/dd7f2cfe-6bd2-4d99-b933-5356a5576e15/">ILM With FP1 and Exchange 2007</a></li>
<li><a href="http://social.technet.microsoft.com/Forums/en-CA/identitylifecyclemanager/thread/8c172bab-042f-45b7-ba73-14a8a27b9f0c">Exchange 2007 &#8216;Shared&#8217; Mailbox Provisioning with ExchangeUtils</a></li>
<li><a href="http://social.technet.microsoft.com/Forums/en-US/identitylifecyclemanager/thread/20485235-cd87-4550-a912-d6340bd8f8a0/">Attribute List for Exchnage 2003</a></li>
</ul>
<p> </p>
<h2 style="color: #365f91;">About the Author</h2>
<p>Carol Wapshere has been working in IT since 1990, and has since worked in many different organizations, across four different countries. She started out in Netware then moved into Microsoft server products, picking up an assortment of skills in other non-Microsoft systems along the way. She first started working with MIIS in 2005 and loved how it could be used to tie together disparate systems, bringing in much-needed order, and making lots of tedious jobs just disappear.</p>
<p>Thanks to Markus Vilcinskas and Peter Geelan for their help with this document.</p>
<hr class="sig" />
<p>http://www.wapshere.com/missmiis</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/managing-exchange-200020032007-with-ilm-2007/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wapshere.com/missmiis/managing-exchange-200020032007-with-ilm-2007</feedburner:origLink></item>
		<item>
		<title>A real life SCR failover</title>
		<link>http://feedproxy.google.com/~r/missmiis/~3/wcIUjZf5_zQ/a-real-life-scr-failover</link>
		<comments>http://www.wapshere.com/missmiis/a-real-life-scr-failover#comments</comments>
		<pubDate>Fri, 06 Nov 2009 20:41:37 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Exchange 2007]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=563</guid>
		<description><![CDATA[Quite unexpectedly this week, I got to genuinely use SCR &#8220;in anger&#8221; when I killed a client&#8217;s production Exchange 2007 server by attempting to install SP2 on it (for that whole sorry story see http://social.technet.microsoft.com/Forums/en/exchangesoftwareupdate/thread/713d2b17-f19d-4eaf-8146-c51f59942d08?prof=required). I&#8217;ll keep my swearing about SP2 off the page here and focus on the hero of the week &#8211; which was SCR!

I&#8217;ve had [...]]]></description>
			<content:encoded><![CDATA[<p>Quite unexpectedly this week, I got to genuinely use SCR &#8220;in anger&#8221; when I killed a client&#8217;s production Exchange 2007 server by attempting to install SP2 on it (for that whole sorry story see <a href="http://social.technet.microsoft.com/Forums/en/exchangesoftwareupdate/thread/713d2b17-f19d-4eaf-8146-c51f59942d08?prof=required">http://social.technet.microsoft.com/Forums/en/exchangesoftwareupdate/thread/713d2b17-f19d-4eaf-8146-c51f59942d08?prof=required</a>). I&#8217;ll keep my swearing about SP2 off the page here and focus on the hero of the week &#8211; which was SCR!</p>
<p><span id="more-563"></span></p>
<p>I&#8217;ve had some problems with setting up SCR on earlier rollup packs (ru5 and earlier). On one server I could only do manual reseeds, and I had some problems with <a href="http://www.wapshere.com/missmiis/exchange-2007-outlook-anywhere-on-windows-2008-the-ipv6-bug-is-still-there">ipv6, OA and SCR</a>. But that was then &#8211; this week, using SP1RU9 and SP2, SCR has manifestly done what it&#8217;s supposed to.</p>
<p>The setup was as follows:</p>
<ul>
<li>Two identically spec&#8217;d servers with Mailbox, Hub and CAS roles</li>
<li>Eight storage groups of between 500MB and 25GB in size.</li>
</ul>
<h3>Configuring SCR</h3>
<p>I configured SCR following the <a href="http://technet.microsoft.com/en-us/library/bb676465.aspx">technet docs</a>.  But in brief I:</p>
<ol>
<li>Created Data and Log folders on the target server that matched the source server.</li>
<li>Used the Enable-StorageGroupCopy cmdlet to get things started:
<ul>
<li><span lang="EN-US">Enable-StorageGroupCopy -identity <em>StorageGroup</em> -ReplayLagTime 0 -StandbyMachine <em>TargetServer</em></span></li>
</ul>
</li>
<li><span lang="EN-US">Ran the Update-StorargeGroupCopy cmdlet on the <em>target</em> server to seed the replication:</span>
<ul>
<li><span lang="EN-US">Update-StorageGroupCopy -Identity <em>SourceServer</em>\<em>StorageGroup</em> -StandbyMachine <em>TargetServer</em></span></li>
</ul>
</li>
<li><span lang="EN-US"><span lang="EN-US">Created standby storage groups and mail databases on the target server, according to the advice in the technet articles. These have different Data and Log folder to the copy locations, but are waiting and ready to have their paths changed at the moment of urgency. It really does make the failover procedure much quicker!</span></span></li>
<li><span lang="EN-US">Monitored the status of SCR with the Get-StorageGroupCopyStatus cmdlet:</span>
<ul>
<li><span lang="EN-US">Get-StorageGroupCopyStatus -StandbyMachine TargetServer</span></li>
</ul>
</li>
</ol>
<h3>Failing Over</h3>
<p>I failed over the databases using the process I outlined in <a href="http://www.wapshere.com/missmiis/exchange-2007-failover-and-failback-with-scr">this post</a>. This is where SCR really came into its own. The failover process took about 10 minutes per database (and you can do several in parallel). The longest part was actually the final step which reassigns users to their new MDB.</p>
<p>The best thing of all was we had NO DATA LOSS! I admit to some confusion over the whole &#8220;inbuilt 50 log limit&#8221; thing &#8211; but now I see that this is only a roll-in limit &#8211; the logs are replicated immediately, and the eseutil command, which you run as part of the failover process, rolls them in. The only way you can lose data with SCR is if the source server crashes before, or during, replicating the absolutely most recent logs. Data loss, if any, will therefore be very small.</p>
<h3>Syncing Back</h3>
<p>We plan to fail back but we haven&#8217;t done it yet. Everything is running on the DRP server and we&#8217;re going to let the dust settle a bit before we move back to the (now rebuilt) original server. In my <a href="http://www.wapshere.com/missmiis/exchange-2007-failover-and-failback-with-scr">earlier SCR post</a> I outlined a manual database copy back to the source server, which involved downtime.  But actually I&#8217;m trying something different now it&#8217;s really happening.</p>
<p>Basically I have set the original server as my new SCR target. To do this I <em>did not</em> recreate the Storage Groups and Mail Databases on the original server &#8211; I just made sure the same Data and Logs folders were available.</p>
<p>When the time comes to do the full failover I will essentially execute the failover procedure in the opposite direction. I will post again with the exact steps when its done.</p>
<h3>Other things to think of</h3>
<p>If you want your DRP server to also take over Hub, CAS and Public Folder roles, then there is more than just SCR to think about.</p>
<h4>CAS Role</h4>
<p>It is good planning to assign a CName to your OWA and ActiveSync URL. Just make sure that all your possible CAS servers include this CName in their certificate: <a href="http://technet.microsoft.com/en-us/library/aa995942.aspx">http://technet.microsoft.com/en-us/library/aa995942.aspx</a></p>
<p>Also be aware of something I had forgotten &#8211; Outlook can only redirect a user to their new server <em>if the old server is responding</em>. This is a total sh*t if your old server is dead and gone. I read somewhere that it may work to assign the old server name to the new server as a CName, but you may not be able to do that if you are still trying to resurrect the old one. We got by with OWA and the hard-pressed Helpdesk having to talk a lot of people through changing their Outlook profile. If you really want to be prepared then write a script now that can change the server in outlook profile (googling shows various options &#8211; none of which I&#8217;ve tried as yet &#8211; though one of my collegues says MAINTWIZ can help).</p>
<h4>Hub Role</h4>
<p>Make sure all Send and Receive connectors are replicated somewhere. Use costs on Send connectors to favour your usual production route.</p>
<p>Also, if you have scripts or applications sending email via the Exchange server, make sure a CName is used which you can rapidly change in DNS.</p>
<h4>Public Folders</h4>
<p>Make sure all your Public Folders, FREE BUSY and OAB folders have more than one replica server.</p>
<p>I had some weird experiences with trying to add the DRP server as an extra replica to top-level folders. Then I found <a href="http://clintboessen.blogspot.com/2009/06/cannot-add-replicas-to-certain-system.html">this post</a> and after that I gave up. It did mean that, after the failover, I had to manually add the DRP server as a replica to the top-level folders.</p>
<p> I also had other bizarre public folder errors which involved:</p>
<ul>
<li>Manually changing the Default public folder database on the Mail Databases on the DRP server (see the Client Settings tab on the properties of the Mail Database in Exchange Management Console),</li>
<li>Manually changing the siteFolderServer property on the Administrative Group objects in AD,</li>
<li>Manually changing the siteFolderServer and offLineABServer on the Default Offline Address Book object in AD.</li>
</ul>
<h2>In summary&#8230;</h2>
<p>The SCR part of the failover was the easiest part of the whole week &#8211; we had more trouble with incorrect public folder settings, missing Send connectors, and a fussy backup client that didn&#8217;t want to install on the DRP server.</p>
<p>The biggest problem with SCR is that there is no straight-forward &#8220;fail back&#8221; procedure. As I&#8217;ve said before, SCR is <em>not</em> a cluster, but rather a one-way replication to a standby server. However I think it is proving itself to be a great technology, and it&#8217;s no wonder that Exchange 2010 is building on the SCR model with Database Availability Groups. I&#8217;m looking forward to them! (Despite the dodgy anagram, which you have to be Australian to appreciate. You dag.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/a-real-life-scr-failover/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.wapshere.com/missmiis/a-real-life-scr-failover</feedburner:origLink></item>
	</channel>
</rss>
