#FIM2010 Run on Policy Update saves the day

As this old 2009 post on the Bobby and Nima blog attests to, there is often value in turning on the ROPU setting on a FIM2010 workflow – even if it’s only temporarily.

My use case is a workflow which adds a sync rule to a target user object to write back an email address to an HR system … in this case actually this means creating a contact record with the new email.  During testing I had found that bulk emails initiated from an HR platform to live users when their email was set had the potential to be career limiting – and I needed to introduce an override concept.  This I did by implementing a sync rule parameter and testing for the presence of a value in the supplied parameter in the EAF for email.  If a value was set I would use that instead of the email bound to my user object. Simple enough idea, and did the trick nicely.  That is until the default email value for existing users needed changing …

Changing the parameter on the workflow is the obvious first step – but this of course didn’t affect the existing EREs.  Enter ROPU.  Simply disabling and re-enabling my MPR re-triggered my workflow (set transition IN) for every user in scope of my ResourceFinalSet – sure this was a lot of activity in a short period of time, but it did the trick.

Note that I find it is ALWAYS good practice to remove any existing SR as the first step of my workflow before adding any new SRs … otherwise you can get the same SR added many times over.

Posted in FIM (ForeFront Identity Manager) 2010 | Leave a comment

Replay your #FIM2010 ADDS MA

An interesting take on the Replay MA idea came to me that I want to share today.

So far the published use cases for this idea have been restricted to the ‘replaying’ of the FIM Service MA alone – such as dealing with ‘skipped-not-precedent’ issues and the like.  This post is about a different more topical scenario – specifically the need to manage Office 365 licence allocations based on AD group membership.  In this case, the customer wants to manage allocations based on group membership managed through a (non-FIM) 3rd party tool … and FIM Synchronisation (via the AAD connector) is being tasked the job of translating membership changes to license allocation changes for Office 365.

The problem with this is two-fold:

  1. The API for assigning licenses works on the basis of what licenses do you NOT want a user to get (a topic for another day); and
  2. The delta is on the GROUP object when you actually need a delta on the USER (member) objects.

Solution?  Simple … replay the delta import of your source ADDS MA, and map the member user objects to your FIM Metaverse to ‘touch’ these MV objects and trigger your export attribute flow to AAD/Office 365.  There you have it … a kind of freebie version of the traditional ‘Auxiliary MA’ idea from MIIS/ILM days.


Posted in Active Directory, FIM (ForeFront Identity Manager) 2010, ILM (Identity Lifecycle Manager) 2007 | Tagged , , , , | 4 Comments

A midsummer LITE dream

With our own personal identity details being proliferated on the web at an unprecedented rate, many of us are finally taking steps of our own to protect ourselves. But it is a daunting proposition to reign in what has already become a runaway train in many ways.

Lying in bed trying to get to sleep, I wonder what would happen if I woke up to find my iPhone being held to ransom by unscrupulous identity thieves. At least I’ll be aware almost as soon as it happens, and stand a fighting chance of doing something about it I hope.  But what happens in a corporate context when the identity theft goes unnoticed for some time? I’m talking about things like acts of fraud or malice carried out by former employees against a former employer through access that wasn’t identified and revoked in time.

This scenario is very real now and has been for many years. One of my first major IdM projects on the old MIIS platform was commissioned for exactly that reason. That organisation was compelled by its own shareholders and stakeholders to take action in response to an attack, and fortuitously for all parties the funds were always going to be set aside to make this happen. However, almost a decade later, most organisations are still waiting for an ‘opportune moment’ to take the plunge in their own IdM initiative, and crossing their fingers that nothing sinister will catch them napping in the meantime.

I strongly suspect many organisations are foolishly waiting for someone else to magically solve their problem for them. Surely one day soon a Cloud Identity Service provider will reach out and pull them onto the rescue helicopter and save their organisation the pain of building their own solution?

I drift off to a restless sleep …

<cue spooky music>

I find myself the CEO of a small-medium sized retail firm of some 300 employees and have been in operation for just on 10 years. I have long recognised the value in relocating my rapidly expanding IT operations to the cloud, and have just taken what I considered to be the obvious step of moving to Office 365.

Like 98% of all organisations these days I already had my own ‘on prem(ise)’ Active Directory forest, and having just made the O365 move I am beaming with self-satisfaction of refusing to approve the in situ upgrade of our old Exchange mail system my CIO recommended 3 years ago. However I canned an IdM initiative at the same time, with funds being redirected to a (much sexier!) company intranet replacement with Office SharePoint and a CRM.

At the time my CIO reported that our company’s AD was in need of a redesign, and that some of the more attractive features of SharePoint (audience targeting, built-in manager org structure, approval delegations) and Exchange (dynamic address lists) were not going to be usable without this. Furthermore, AD groups and address lists had proliferated to the point where there were more groups than users. But worse still, nobody seemed to be on top of which user accounts should be active, or which now had inappropriate permissions. Despite all this, I accepted advice from a trusted vendor that a quick fix was all that was needed to ‘rationalise’ the number of groups and disable all accounts which had not been accessed in 3 months. I also recall that a quick cross-check with a dump from our chris21 HR system had identified several accounts of former employees which were also disabled.

That was 6 months ago, and since then I have been marveling at how much more reliable our email service has been, with no obvious additional management overhead now that Microsoft’s ‘DirSync’ ( or ‘identity bridge’ as we refer to it now) was quietly humming away automatically provisioning mailboxes and syncing Azure identities and now passwords with our 10-year old on-prem AD. Life is sweet, and I am now asking my CIO to look at commissioning other cloud services such as SalesForce now that Azure federated access with single-sign-on (SSO) is readily available.

The tranquility is rudely interrupted with a call from my CFO who has just been advised that the O365 license limit had been exceeded and that I need to double our number of CALs. In addition mailbox limit allocations initially selected were now woefully inadequate, despite only minimal growth in our organisation size. Worse was to come.

I now find myself reading an email from a large client that is thanking me for my advice for them to cancel their regular large purchase order, and saving them any potential embarrassment of being caught short.  They tell me they were at first disappointed and confused, but are now happily signed on with a major competitor for the next 3 years. This is a huge surprise to me as I was only at lunch with their MD the previous month and had agreed on a new deal for additional product lines. Instead the email finishes thanking me for our many years as their trusted supplier and wishes me all the best.

I sit there scratching my head as to how this could happen … then I remember a conversation I had with a former employee before they left the company to join this same major competitor, where he had asked explicitly about the account and how proud he had been to introduce them to us ten years ago.  The penny dropped and I realised what must have happened.

I immediately reach for the phone but before I can speak to my AD administrator to investigate a possible security breach, I wake up in a cold sweat …

I decide that my life must be far too dull to be dreaming about this sort of stuff (supposing for a minute that I actually did!).  But I do wonder what it will take for people to get serious about sorting out the integrity of their on-premise AD before they go publishing it willy-nilly to the cloud.  Why doesn’t everyone listen to us wise Identity folk and “bite the IAM bullet” sooner rather than later.  I suspect it just comes down to people riding their luck as long as they can … and as long as they can argue that a “proper” IAM solution is out of their reach for now.

Well the good people at UNIFY have come up with our new “LITE” approach to IdM (for chris21 or Aurion HR only at this stage), so that companies like the one in my dream can have a foundation level, enterprise standard IdM solution deployed to production within a couple of days (my first site took only 3 days).  They can now happily DirSync to their hearts’ content safe in the knowledge that only current staff have access to O365 and their federated SalesForce customer directory, with the added bonus of an always accurate GAL complete with manager-based organisational structure.  And by the time they want to extend this to the next connected system, we can seamlessly extend to FIM2010 now or look to leverage the new MIM platform as a logical progression.

Posted in Active Directory, FIM (ForeFront Identity Manager) 2010, Identity Broker LITE | Tagged , , | 2 Comments

#FIM2010 MPR Integrity Checks

I recently had reason to suspect that there were a number of MPRs which had become corrupted in a lab environment due to the deletion of set objects.

FIM 2010 doesn’t complain when you delete a set, but it will leave any associated MPRs in an invalid state.  Obviously this is not desirable, and you wouldn’t intentionally be doing this.  However, it is possible that someone who doesn’t know any better could make this mistake, and if they have, how would you know?

I decided I’d write a couple of xpath queries which could probably be useful as MPR search scopes – they identified a number of faulty MPRs, and they may be worth running on your own environments now for that extra peace of mind!

  • Rights-granting policy where the PRINCIPAL set reference is missing
/ManagementPolicyRule[not(PrincipalSet=/*) and GrantRight=true and not(starts-with(PrincipalRelativeToResource,'%'))]
  • Non-rights-granting policy where the FINAL set reference is missing
/ManagementPolicyRule[not(ResourceFinalSet=/*) and not(GrantRight=true) and not(starts-with(PrincipalRelativeToResource,'%')) and not(starts-with(ActionType,'Transition'))]
  • Transition IN policy where the FINAL set reference is missing
/ManagementPolicyRule[not(ResourceFinalSet=/*) and not(GrantRight=true) and not(starts-with(PrincipalRelativeToResource,'%')) and (starts-with(ActionType,'TransitionIn'))]
  • Transition OUT policy where the CURRENT set reference is missing
/ManagementPolicyRule[not(ResourceCurrentSet=/*) and not(GrantRight=true) and not(starts-with(PrincipalRelativeToResource,'%')) and (starts-with(ActionType,'TransitionOut'))]

Note that the above queries are not likely to be a definitive set, and I’d be keen to add to them over time.  They also are written on the premise that MPRs which are rights-granting do not invoke any action workflows (a “best practice” I stick to religiously).

Hope this sparks some other ideas on FIM policy integrity checks.  Let me know if you come up with any others, or variations on the above.


Posted in FIM (ForeFront Identity Manager) 2010 | Tagged , , | Leave a comment

Identifying #FIM2010 Database Index Fragmentation

I want to share the following SQL script which I have adapted for FIM from the original here.

If you read the blog post you will understand that both FIM databases meet the criteria the author describes (GUID cluster keys) as a cause for high index fragmentation, leading to poor FIM performance in a variety of ways (even leading to SQL timeouts in extreme cases).  If only the GUID keys were able to be sequential to be able to avoid this problem – but alas they are not.  Hence the need to do something about them – and regularly!

When troubleshooting poor application performance where SQL is involved, my approach (with both FIM services) is to open the following script in SQL Server Management Studio, selecting the FIMService database in the toolbar drop-down list:

 OBJECT_NAME (ips.[object_id]) AS [Object Name],
 si.name AS [Index Name],
 ROUND (ips.avg_fragmentation_in_percent, 2) AS [Fragmentation],
 ips.page_count AS [Pages],
 ROUND (ips.avg_page_space_used_in_percent, 2) AS [Page Density],
 WHEN ips.avg_page_space_used_in_percent = 0
 THEN ips.page_count * ROUND (ips.avg_fragmentation_in_percent, 2)/100
 ELSE ips.page_count * ROUND (ips.avg_fragmentation_in_percent, 2) / ROUND (ips.avg_page_space_used_in_percent, 2)
 END AS [Weighting]
FROM sys.dm_db_index_physical_stats (DB_ID ('FIMService'), NULL, NULL, NULL, 'DETAILED') ips
--FROM sys.dm_db_index_physical_stats (DB_ID ('FIMSynchronizationService'), NULL, NULL, NULL, 'DETAILED') ips
CROSS APPLY sys.indexes si
 si.object_id = ips.object_id
 AND si.index_id = ips.index_id
 AND ips.index_level = 0
 AND si.name IS NOT NULL
 WHEN ips.avg_page_space_used_in_percent = 0
 THEN ips.page_count * ROUND (ips.avg_fragmentation_in_percent, 2)/100
 ELSE ips.page_count * ROUND (ips.avg_fragmentation_in_percent, 2) / ROUND (ips.avg_page_space_used_in_percent, 2)

The results I will get back (after about a minute running the first time) will show the tables which I have rated as the most in need of defragmentation (highest weighting) at the top.  I then proceed down the list to simply locate each offending table (e.g. ObjectValueReference is a prime candidate), expand the database table in the Object Explorer treeview, and select the Rebuild All option from the RH mouse menu (at this point I am a tad heavy-handed, and prefer to rebuild ALL of the indexes not just the one that shows the highest weighting).  For particularly large FIM databases it is often best to stop the FIMService first before doing this, but I find I don’t always have to do this.  Once I have completed this exercise I repeat it once or twice until I am satisfied that the remaining fragmentation is acceptable and not likely to cause further problems for now.

I then select the FIMSynchronizationService database in the drop-down list, comment the line referencing FIMService, uncomment the corresponding FIMSynchronizationService line, and repeat the above process for the FIM Sync database (with far less tables here you will find this far quicker).

At some stage I plan to implement something along the lines of the SQL Server Maintenance Solution , but in the meantime I am using this spot fix approach – particularly after the initial system data load on deployment, or after periods of high data volatility such as the beginning of a school year at an education site :).  I like the weighting idea because the generic > 30% fragmentation rule sometimes used (or similar) doesn’t necessarily highlight those fragmented table indexes which are having the greatest performance impact but may be below your threshold.

Posted in FIM (ForeFront Identity Manager) 2010, ILM (Identity Lifecycle Manager) 2007 | Tagged , , , , , | 5 Comments

#FIM2010 R2 SP1 (W2012) Oracle Management Agent requires additional Oracle driver

My good friend Henry from infoWAN in Germany asked me to post the following for him on my blog (in lieu of setting up one of his own at least for now).  Here is the tip that Henry discovered and was so keen to share …

My task was to replace an ILM 2007 Server with FIM 2010 R2 SP1 running on Server 2012. The newly configured FIM Server is being stood up alongside other systems connected to an Oracle Database Version 11g.  Here was my approach

  1. Checked the Server compatibility with the release notes of FIM 2010 R2 SP1.
  2. Checked Oracle compatibility with the Management Agent list.
  3. Installed FIM and the Oracle Client Software 11.2.0.x and tried to create the Oracle Management Agent ,,,

This was as far as I got before I the install failed, reporting the Client Software could not be found as displayed below:


Error connecting to Oracle database’

At this point I checked Oracle Database connection using SqlPlus and was able to open the View in question. Given this proved the client was installed correctly and the settings in the tnsnames file were also fine, I then checked file permission on the Oracle Client directory for the FIMSync Service Account as others had suggested in the same situation.

I then dug a bit deeper, using the Process Monitor to look up what was happening behind the scenes. The most important clue that led me the right direction was the highlighted access to a CLSID registry key which could not be found by the miisserver.exe:


Using the process monitor to identify a missing registry key

This registry key was not found on the server, so I searched for this ID {3F63C36E-51A3-11D2-BB7D-00C04FA30080} in the Internet and found references to an OLEDB DLL provided by Oracle:


In the end I discovered that this OLEDB driver was NOT included in the Oracle client Software package. Instead it is included in 64-bit Oracle Data Access Components (ODAC) which can be separately downloaded at the Oracle web site.  This is the 64-bit ODAC 11.2 Release 5 ( for Windows x64 – it contains 64-bit Oracle Provider for OLE DB

Having installed the software, the registry key is clearly now available on the server and references the Oracle OLEDB dll – thereby enabling me to create the Oracle Management Agent on my FIM Box:

Oracle DLL registry settings

Oracle DLL registry settings

As it happens, I have a feeling I’ll be needing just this piece of vital info myself in the coming weeks …

Posted in FIM (ForeFront Identity Manager) 2010 | Tagged , | 1 Comment

Uncovering #FIM2010 Service Set Correction Requests

When responding to this FIM forum post tonight it occurred to me that monitoring for and troubleshooting these events is something I’ve probably not rated highly enough on the priority list.

Digging a bit further I stumbled upon this TechNet WIKI article from Markus – and it reinforced the thought that behind every recurring set correction you are likely to uncover a policy design flaw that’s probably going to be a pain in the !@&*#! to track down.  This is right up there with the failed FIM request that occurs when two multiple workflow instances are spawned attempting to concurrently apply the same action on a FIM object – where one succeeds and the other fails with a “denied” exception.  These types of errors are really the hardest to pin down, and it’s why I’m bothering to post about them.

Markus explains a scenario which can cause the set correction condition to occur – I had to read it a couple of times before I understood this.  Maybe you will too – in which case the following variation may help:

The end result of multiple updates for the same FIM resource may well be that the resource satisfies a set criteria, but each not after each request individually.  If requests are processed on a single thread sequentially, then the last request would be expected to cause the criteria to be satisfied.  However, in periods of high volatility and multi-threading, if the individual requests are processed concurrently it is possible for all requests to be fully processed without the set condition having been satisfied.  When this happens set correction is required.

Of course there are going to be other reasons for set corrections being required too – such as exceptions occurring evaluating complex set criteria (particularly when the FIMService database indexes become overly fragmented, or when your criteria is just too complex for FIM to handle).  There is always a trade-off here:

  • reducing the number of set definitions you need at risk of increased complexity (and relying on a defrag/index rebuild regime)
  • using additional nested sets to simplify individual set criteria but (arguably) reduce solution maintainability and risk running foul of stated best practices in this regard.

Note to self – whenever monitoring the health of the FIM Service, look not only at the exceptions and the failures, but also for the presence of set corrections.  Of course if you have SCOM and the FIM 2010 Management Pack (my customer chooses not to) you will no doubt already have the following in hand:

The key monitoring scenarios covered by this management pack are listed below:

  • End-User Availability
  • Synchronization Service Availability
  • FIM Service and Portal Availability
  • FIM Portal Errors Shown to End Users
  • FIM Portal Configuration Errors
  • FIM Service Internal State
  • FIM Service Set Corrections
  • FIM Service Connectivity with Exchange
  • FIM Synchronization Service Configuration Errors
Posted in FIM (ForeFront Identity Manager) 2010 | Tagged , | 1 Comment