Jorge's Quest For Knowledge!

All You Need To Know About Identity And Security On-Premises And In The Cloud. It's Just Like An Addiction, The More You Have, The More You Want To Have!

(2015-03-04) Clearing The MV Object ID Of All Groups In The Portal

Posted by Jorge on 2015-03-04


I had used the script from Carol Wapshere to duplicate FIM Portal objects (groups). With that duplication the MV Object ID was also copied. Therefore from a metaverse perspective I had duplicate objects (multiple objects with the same MV Object ID). When importing those objects into FIM sync you get the error:

image

Figure 1: Ambiguous Import Errors For Specific Objects Against Objects In The Metaverse

image

Figure 2: Ambiguous Import Error For A Specific Object

Because of the duplicate MV Object ID on FIM Portal objects, these (multiple) objects were trying to join to a single MV object instead of projecting new MV objects. The duplicated objects should project into the metaverse instead! The solution to achieve that was to clear the MV Object ID for every group object in the FIM Portal. To get that done I wanted/needed to use PowerShell.

I used the FIM PowerShell Function Library (FIM-PowerShell-Function-Library-Custom.ps1) as described here. Then I created the following simple script

Clearing the MV Object ID of all groups

Add-PSSnapin FIMAutomation
. .\FIM-PowerShell-Function-Library-Custom.ps1
$objectsInFIMToProcess = Export-FIMConfig -Uri $URI –OnlyBaseResources -CustomConfig "/Group"
$objectsInFIMToProcessPSObject = $objectsInFIMToProcess | Convert-FimExportToPSObject
$objectsInFIMToProcessPSObject | %{
    $objectToProcess = $($_.ObjectID).TrimStart("urn:uuid:")
    $objectToProcessPrepared = $objectToProcess | Prepare-FimObject $_.ObjectType
    $objectToProcessPreparedWithChanges = $objectToProcessPrepared | Set-FimAttribute -AttributeName "MVObjectID" -AttributeValue $null
    $objectToProcessPreparedWithChangesToImport = $objectToProcessPreparedWithChanges | Commit-FimObject
}

Cheers,
Jorge
———————————————————————————————
* This posting is provided "AS IS" with no warranties and confers no rights!
* Always evaluate/test yourself before using/implementing this!
* DISCLAIMER:
https://jorgequestforknowledge.wordpress.com/disclaimer/
———————————————————————————————
############### Jorge’s Quest For Knowledge #############
#########
http://JorgeQuestForKnowledge.wordpress.com/ ########
———————————————————————————————

One Response to “(2015-03-04) Clearing The MV Object ID Of All Groups In The Portal”

  1. cwapshere said

    Jorge that script has an array at the top for attributes to skip in the copy:

    $SkipAttribs = @(“ObjectType”,”ObjectID”,”CreatedTime”,”Creator”)

    So the right thing to do is add MVObjectID in there. Which I will do in the master script because it’s a very good point!

    Carol

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: