<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>missmiis &#187; Uncategorized</title>
	<atom:link href="http://www.wapshere.com/missmiis/category/uncategorized/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wapshere.com/missmiis</link>
	<description>Adventures in identity management</description>
	<lastBuildDate>Fri, 03 Feb 2012 20:41:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Annual blag post</title>
		<link>http://www.wapshere.com/missmiis/annual-blag-post</link>
		<comments>http://www.wapshere.com/missmiis/annual-blag-post#comments</comments>
		<pubDate>Mon, 02 Jan 2012 00:54:37 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=1818</guid>
		<description><![CDATA[I&#8217;ve received word that I have been awarded the MVP for 2012. I never take this for granted and it always makes me very happy to receive this acknowledgement, so thank you Microsoft and the FIM PG!
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve received word that I have been awarded the MVP for 2012. I never take this for granted and it always makes me very happy to receive this acknowledgement, so thank you Microsoft and the FIM PG!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/annual-blag-post/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>200th Post!</title>
		<link>http://www.wapshere.com/missmiis/200th-post</link>
		<comments>http://www.wapshere.com/missmiis/200th-post#comments</comments>
		<pubDate>Mon, 24 Oct 2011 21:02:50 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=1736</guid>
		<description><![CDATA[Today&#8217;s post is my 200th. As my 100th post slipped by without me noticing I&#8217;m going to give myself a self-indulgent look back over the history of missmiis to celebrate this milestone.

My first post was on the 18th of May 2007. I&#8217;d been working with MIIS for about two years and found it both heavy [...]]]></description>
			<content:encoded><![CDATA[<p>Today&#8217;s post is my 200<sup>th</sup>. As my <a href="http://www.wapshere.com/missmiis/connectionchangetime">100<sup>th</sup> post</a> slipped by without me noticing I&#8217;m going to give myself a self-indulgent look back over the history of missmiis to celebrate this milestone.</p>
<p><span id="more-1736"></span></p>
<p>My <a href="http://www.wapshere.com/missmiis/what-i-hope-to-do-with-this-blog">first post</a> was on the 18<sup>th</sup> of May 2007. I&#8217;d been working with MIIS for about two years and found it both heavy going and completely absorbing &#8211; in fact I was obsessed! I was also on the verge of a big move: London to Geneva via 3 months in Australia. I started the blog as a memory-aid for myself, as something that might help my employment prospects in Geneva, and of course with the thought that it might help out others, just as I have always found great tips and explanations on other people&#8217;s blogs.</p>
<p>So, 4½ years in, what can I say about missmiis?</p>
<p><strong>Content</strong></p>
<ul>
<li>I&#8217;ve stuck to my original intention of posting only what I&#8217;ve actually done myself &#8211; with any theorising or speculation noted clearly,</li>
<li>I also try to post only what can&#8217;t easily be found elsewhere &#8211; at least, I couldn&#8217;t find it.</li>
<li>If someone else&#8217;s blog post or forum entry has helped me I acknowledge and link it.</li>
</ul>
<p><strong>Reader Stats</strong></p>
<p>My stats don&#8217;t go back to the very beginning, but I definitely can say readership has climbed steadily, except for the year following the Great ILM2 Delay. You can see pretty clearly when that was from looking at my stats!</p>
<p><a href="http://www.wapshere.com/missmiis/wp-content/uploads/2011/10/month-stats.jpg"><img class="alignnone size-full wp-image-1738" title="month stats" src="http://www.wapshere.com/missmiis/wp-content/uploads/2011/10/month-stats.jpg" alt="" width="946" height="369" /></a></p>
<p><strong>Posts of Note</strong></p>
<ul>
<li><a href="http://www.wapshere.com/missmiis/a-galsync-powershell-script">A GALSync powershell script</a> because it is far and above my most popular posting ever.</li>
<li><a href="http://www.wapshere.com/missmiis/powershell-activity">Powershell Activity</a> because, while no great piece of code, it represents when I finally understood how to develop a custom activity &#8211; the usual minimalist MS documentation having left me mostly in the dark.</li>
<li><a href="http://www.wapshere.com/missmiis/ilm-2-release-date-put-back-a-whole-year">ILM 2 release date put back &#8211; A WHOLE YEAR!</a> This was the post where, without realising it, I &#8220;broke&#8221; the news on the internet. This was actually my most-read post for quite some time, especially considering the readership dive that followed.</li>
<li><a href="http://www.wapshere.com/missmiis/exchange-2007-cross-forest-migration">Exchange 2007 Cross-Forest Migration</a> Up until about 18 months ago I was still working as an Exchange, as well as FIM, consultant. There just wasn&#8217;t enough FIM work to keep me fully occupied (there is now!) This is my most-read Exchange post.</li>
</ul>
<p><strong>What this blog has given me</strong></p>
<ul>
<li>A convenient place to put stuff so I know where to find it,</li>
<li>Speaking opportunites, starting with TechDays Geneva 2008 where I presented ILM 2007,</li>
<li>Three MVP awards,</li>
<li>The chance to meet some great people, and</li>
<li>A <a href="http://www.thefimteam.com">job</a>!</li>
</ul>
<p><strong>And why is the blog still named after an eight year old product?</strong></p>
<p>No reason I should rename my blog every time Microsoft rename their product.</p>
<p>However, even if I don&#8217;t use it, I have permanent dibs on <em>FIM fatale</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/200th-post/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Minimalist Office 365 with ADFS sandbox</title>
		<link>http://www.wapshere.com/missmiis/minimalist-office-365-with-adfs-sandbox</link>
		<comments>http://www.wapshere.com/missmiis/minimalist-office-365-with-adfs-sandbox#comments</comments>
		<pubDate>Tue, 13 Sep 2011 06:34:46 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[ADFS]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Office 365]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=1690</guid>
		<description><![CDATA[It&#8217;s kind of killing my laptop, but I have managed to get my virtual lab environment working with ADFS to an Office 365 trial. I think I&#8217;ve probably got the bare minimum config going on here, so for reference, here&#8217;s what I had to do.

Ingredients

A host computer &#8211; in my case my Win7 laptop running [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s kind of killing my laptop, but I have managed to get my virtual lab environment working with ADFS to an Office 365 trial. I think I&#8217;ve probably got the bare minimum config going on here, so for reference, here&#8217;s what I had to do.</p>
<p><span id="more-1690"></span></p>
<h3>Ingredients</h3>
<ul>
<li>A host computer &#8211; in my case my Win7 laptop running Oracle VirtualBox,</li>
<li>An Office 365 trial,</li>
<li>A real live domain name that is resolvable on the internet and which you (or someone who likes you) has admin access to (this will be necessary for the <a href="http://onlinehelp.microsoft.com/en-us/office365-enterprises/gg584188.aspx">verification process</a>),</li>
<li>A SSL certificate for said domain name,</li>
<li>The following VMs:</li>
<ul>
<li>DC + ADFS: Win2008R2, 1024 MB of RAM (I couldn&#8217;t get ADFS to install with only 512MB), virtual network and internet access</li>
<li>DirSync: Win2008x32, 512 MB of RAM, virtual network and internet access</li>
<li>Workstation: Win7, 512 MB of RAM, virtual network and internet access</li>
</ul>
</ul>
<blockquote><p>Note: there is now a 64 bit version of DirSync so it should be possible to install that on the DC as well.</p></blockquote>
<h3>AD</h3>
<p>The name of my virtual AD domain did not match the external domain I had to use for ADFS. This does not matter &#8211; just add the external domain as a UPN suffix to AD.</p>
<p>You then also need to make sure any account you want to test with has a UPN of <em><a href="mailto:accountname@myrealdomain.com">accountname@myrealdomain.com</a></em>.</p>
<h3>Certificate</h3>
<p>I was under the impression that I&#8217;d need a public cert so Microsoft would trust my ADFS server, so I got a free one month cert from <a href="http://www.freessl.com">freessl</a>. However I can see now that the cert is only used for internal communication between my ADFS server and my client, so I think now if I&#8217;d generated one in my own CA it would have been fine. The only provisio is the name of the cert must match <em>myrealdomain.com</em>.</p>
<h3>ADFS</h3>
<p>The <a href="http://onlinehelp.microsoft.com/en-us/office365-enterprises/ff652539.aspx">instructions </a>walk you through a proper setup with NLB and federation proxies. With a laptop lab I did none of this. I just have the one federation server running on my DC. Pretty much all I did was:</p>
<ol>
<li>Installed ADFS &#8211; make sure you choose &#8220;first server in a farm&#8221;,</li>
<li>Installed the SSL certificate for <em>myrealdomain.com</em> onto the default IIS website,</li>
<li>Ran the ADFS wizard,</li>
<li>Ran the powershell cmdlets to add and federate the domain in Office 365 (<a href="http://onlinehelp.microsoft.com/en-us/office365-enterprises/ff652560.aspx">documentation</a>).</li>
</ol>
<h3>Internet Firewall</h3>
<p>Another thing I was mistaken about was thinking the Microsoft Federation gateway would need to talk directly to my ADFS server but actually it doesn&#8217;t &#8211; the communication is between the client browser and ADFS. I&#8217;m not allowing external devices to access Office 365 via my lab, so I don&#8217;t need to grant access to my ADFS VM through the network firewall. Which is a relief!</p>
<h3>DNS</h3>
<p>The domain <em>myrealdomain.com</em> has a real, live ip address on the internet, however in my virtual network I want it to resolve to the internal ip address of my ADFS server. To do this I:</p>
<ul>
<li>Created a Primary Zone for <em>myrealdomain.com</em> in my domain&#8217;s DNS service,</li>
<li>Created an A record in the zone pointing to the internal ip address of the ADFS server,</li>
<li>Set a forwarder to the external DNS server, and</li>
<li>Made sure all VMs in my virtual network used the virtual DC for DNS, rather than going straight to the external DNS.</li>
</ul>
<h3>DirSync</h3>
<p>As I noted above, when I wrote this article there was only 32 bit DirSync. Now we finally have a 64 bit version. It should run on the DC but I haven&#8217;t tried it.</p>
<p>DirSync is damn easy to install. Just follow the <a href="http://onlinehelp.microsoft.com/en-us/office365-enterprises/ff652545.aspx">instructions</a>.</p>
<h3>Activate an account</h3>
<p>Once you have accounts DirSync&#8217;d up to Office 365, with the correct UPN matching the real domain that you federated, you can now activate one or two of them to use as tests.</p>
<h3>Test</h3>
<p>To test I logged in to my virtual workstation. This has a bridged internet connection in addition to the virtual network connection, and all DNS goes via the virtual DC.</p>
<p>I went to <a href="https://portal.microsoftonline.com">https://portal.microsoftonline.com</a> and entered the user&#8217;s UPN. When I clicked the Password box it was greyed out and a link appeared telling me to authenticate against <em>myrealdomain.com</em>. I clicked this link and, after a few URL changes flicked across the address bar, I&#8217;m in!</p>
<h3>Troubleshooting</h3>
<p>The main mistake I made was to install the ADFS server in standalone mode the first time. Login actually worked, but it wasn&#8217;t SSO &#8211; the user had to re-enter their username and password. Checking the Security log on the DC showed NTLM auth being used.</p>
<p>So I re-ran the ADFS wizard (as the link had dissappeared from the Mnagement console I ran C:\Program Files\Active Directory Federation Services 2.0\FsConfigWizard.exe) and chose server farm. I then re-ran the powershell cmdlet Convert-MsolDomainToFederated.</p>
<p>Everything looked good, but wasn&#8217;t. I kept getting &#8220;Your organization could not sign you in to this service&#8221;. In the event logs I could actually see the user successfully logging in with Kerberos, but at the same time a KDC_ERR_BADOPTION error.</p>
<p>After much troubleshooting and hair-tearing I decided to run the powershell cmdlet Update-MsolFederatedDomain &#8211; and it fixed the problem!</p>
<p>As I&#8217;d had the foresight to run a Get-MsolFederationProperty both before and after the Update cmdlet I could actually compare and see what changed. The problem was the TokenSigningCertificate &#8211; it looks like the Convert cmdlet did not overwrite this so it still had the old thumbprint. After I ran Update the thumbprint changed to the new cert.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/minimalist-office-365-with-adfs-sandbox/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Thank you again to Microsoft</title>
		<link>http://www.wapshere.com/missmiis/thank-you-again-to-microsoft</link>
		<comments>http://www.wapshere.com/missmiis/thank-you-again-to-microsoft#comments</comments>
		<pubDate>Sun, 02 Jan 2011 11:26:02 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=1201</guid>
		<description><![CDATA[
Three years now &#8211; must be doing something right  
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wapshere.com/missmiis/wp-content/uploads/2011/01/MVP-badge.jpg"><img class="alignnone size-medium wp-image-1202" title="MVP badge" src="http://www.wapshere.com/missmiis/wp-content/uploads/2011/01/MVP-badge-300x123.jpg" alt="" width="300" height="123" /></a></p>
<p>Three years now &#8211; must be doing something right <img src='http://www.wapshere.com/missmiis/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/thank-you-again-to-microsoft/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Code Snippets page updated</title>
		<link>http://www.wapshere.com/missmiis/code-snippets-page-updated</link>
		<comments>http://www.wapshere.com/missmiis/code-snippets-page-updated#comments</comments>
		<pubDate>Wed, 15 Dec 2010 16:20:35 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=1170</guid>
		<description><![CDATA[I have finally got round to updating my long neglected Code Snippets page. I will try and keep it more up to date in future!
]]></description>
			<content:encoded><![CDATA[<p>I have finally got round to updating my long neglected <a href="http://www.wapshere.com/missmiis/code-snippets">Code Snippets</a> page. I will try and keep it more up to date in future!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/code-snippets-page-updated/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s in a name?</title>
		<link>http://www.wapshere.com/missmiis/whats-in-a-name</link>
		<comments>http://www.wapshere.com/missmiis/whats-in-a-name#comments</comments>
		<pubDate>Fri, 30 Apr 2010 07:32:13 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=783</guid>
		<description><![CDATA[I&#8217;ve had a few people ask if I&#8217;m renaming my blog, and was canvassing FIMFatale at TEC to general approval &#8211; however I&#8217;ve decided to stick with miss miis. Conrad Bayer told us in his keynote that FIM (or was it just FIM sync?) has been moved to the AD group &#8211; so I imagine [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had a few people ask if I&#8217;m renaming my blog, and was canvassing <em>FIMFatale</em> at TEC to general approval &#8211; however I&#8217;ve decided to stick with miss miis. Conrad Bayer told us in his keynote that FIM (or was it just FIM sync?) has been moved to the AD group &#8211; so I imagine Active Directory Identity Services is in the future of this product. (Honestly, makes more sense to me than Forefront.)</p>
<p>So while they rename I&#8217;m staying historical. And besides, I <a href="http://www.wapshere.com/missmiis/exchange-2007-failover-and-failback-with-scr">don&#8217;t</a> <a href="http://www.wapshere.com/missmiis/powershell-retrieving-data-from-excel">just</a> <a href="http://www.wapshere.com/missmiis/ldap-bind-to-a-rodc">post</a> <a href="http://www.wapshere.com/missmiis/battle-scarred-but-mostly-victorious-experiences-with-the-exchange-2007-transporter-for-lotus-notes">about</a> FIM.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/whats-in-a-name/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Account Deprovisioning Scenarios</title>
		<link>http://www.wapshere.com/missmiis/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>
		</item>
		<item>
		<title>WordPress Worm</title>
		<link>http://www.wapshere.com/missmiis/wordpress-worm</link>
		<comments>http://www.wapshere.com/missmiis/wordpress-worm#comments</comments>
		<pubDate>Sun, 06 Sep 2009 08:11:53 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=546</guid>
		<description><![CDATA[There&#8217;s a worm about that attacks blogs via subscriber accounts. I&#8217;ve noticed a few recent registrations without any subsequent comment &#8211; and really the only reason to register on my blog is to comment &#8211; so I did think this odd. For security I have deleted all recent accounts that registered and did not comment. [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a <a href="http://wordpress.org/development/2009/09/keep-wordpress-secure/">worm about</a> that attacks blogs via subscriber accounts. I&#8217;ve noticed a few recent registrations without any subsequent comment &#8211; and really the only reason to register on my blog is to comment &#8211; so I did think this odd. For security <em>I have deleted all recent accounts that registered and did not comment</em>. If I have deleted a genuine account, please accept my apologies &#8211; I will of course welcome your re-registration and comments!</p>
<p>If anyone happens to notice any weird content or broken or inappropriate links I&#8217;d be much obliged for a heads-up.</p>
<p>Thanks,  Carol.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/wordpress-worm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My New Year&#8217;s pressie from Microsoft</title>
		<link>http://www.wapshere.com/missmiis/my-new-years-pressie-from-microsoft</link>
		<comments>http://www.wapshere.com/missmiis/my-new-years-pressie-from-microsoft#comments</comments>
		<pubDate>Fri, 02 Jan 2009 17:27:45 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=278</guid>
		<description><![CDATA[Notification of an MVP award was in my inbox this morning &#8211; a very nice way to start the new year!
I only hope I can find myself some good ILM 2 projects in 2009. The last few months of 2008 was all about Exchange, and next week I&#8217;m off on a SCOM course. Still, I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>Notification of an MVP award was in my inbox this morning &#8211; a very nice way to start the new year!</p>
<p>I only hope I can find myself some good ILM 2 projects in 2009. The last few months of 2008 was all about Exchange, and next week I&#8217;m off on a SCOM course. Still, I&#8217;ve always said I love working in IT because I&#8217;m always learning something new!</p>
<p>Wishing all my readers a happy 2009, filled with the things that are really important.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/my-new-years-pressie-from-microsoft/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Summer hols time</title>
		<link>http://www.wapshere.com/missmiis/summer-hols-time</link>
		<comments>http://www.wapshere.com/missmiis/summer-hols-time#comments</comments>
		<pubDate>Tue, 29 Jul 2008 17:41:58 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=149</guid>
		<description><![CDATA[I won&#8217;t be round for a couple of weeks, in case anyone is wondering why I haven&#8217;t approved a comment.
If you have questions don&#8217;t forget the MS ILM Forum which seems to be working really well, with Ahmad and Markus providing lots of great answers. Wish that had existed when I started out with MIIS!
]]></description>
			<content:encoded><![CDATA[<p>I won&#8217;t be round for a couple of weeks, in case anyone is wondering why I haven&#8217;t approved a comment.</p>
<p>If you have questions don&#8217;t forget the <a href="http://forums.microsoft.com/TechNet/ShowForum.aspx?ForumID=540&amp;SiteID=17">MS ILM Forum</a> which seems to be working really well, with Ahmad and Markus providing lots of great answers. Wish that had existed when I started out with MIIS!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/summer-hols-time/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

