Oliver
2005-06-07 06:33:28 UTC
I am working on a project that does account provision / password sync
from domain1 (here a 'company.net') to domain2 (here:test.net) and both are
AD 2003 domains.
see my drawing for a quick graphical view
Loading Image...
I managed to import Users and Groups to the Metaverse with Management Agent
A.
The Import of additional userdate from Oracle wiht Management Agent B should
be done later.
Now I want to provision the Users/Groups from Metaverse to the Connector
Space.
In relation to the "Simple Account Provisioning"-Scenario from Microsoft, i
hacked code so far (which is at the end of this posting)
I compiled with F5 and put the MyProvision.dll in the <extensions>-folder.
In Identity Manager, I picked my dll for "Metaverse rule extension".
Q:
1. Does my code contains some obvious errors?
2. When does the metaverse extenstion proceeds? (may be a silly questions
but I am not really sure, if the extenstions is running)
3. What else must I probably to do make this Provisioning work? How must
Management Agent C look like (e.g. Run Profile Sync or Export?)
Thanks in advance,
Regards,
Oliver
----------------MY CODE---------------------
Imports Microsoft.MetadirectoryServices
Imports System.Xml
Public Class MyProvision
Implements IMVSynchronization
Public Sub Initialize() Implements
Microsoft.MetadirectoryServices.IMVSynchronization.Initialize
End Sub
Public Sub Provision(ByVal mventry As MVEntry) Implements
IMVSynchronization.Provision
' Get the number of connectors for this MVEntry object under
' this management agent
Dim ManagementAgent As ConnectedMA
Dim Connectors As Integer
Dim newCSEntry As CSEntry
Dim DN As ReferenceValue
Connectors = ManagementAgent.Connectors.Count
DN =
ManagementAgent.EscapeDNComponent(System.Guid.NewGuid().ToString)
If 0 = Connectors Then
' Create the new connector
newCSEntry =
ManagementAgent.Connectors.StartNewConnector("person")
' Assign the distinguished name
newCSEntry.DN = DN
' Finish creating the new connector
newCSEntry.CommitNewConnector()
ElseIf 1 = Connectors Then
' Assign the distinguished name using the existing connector
newCSEntry = ManagementAgent.Connectors.ByIndex(0)
newCSEntry.DN = DN
newCSEntry("LastName").Value = mventry("sn").Value
newCSEntry("givenName").Value = mventry("gn").Value
newCSEntry("sAMAccountName").Value = mventry("uid").Value
newCSEntry("description").Value = mventry("description").Value
Else
Dim ExceptionMessage As String
ExceptionMessage = "Multiple Connectors on Management Agent"
Throw New UnexpectedDataException(ExceptionMessage)
End If
End Sub
Public Function ShouldDeleteFromMV(ByVal newCSEntry As
Microsoft.MetadirectoryServices.CSEntry, ByVal mventry As
Microsoft.MetadirectoryServices.MVEntry) As Boolean Implements
Microsoft.MetadirectoryServices.IMVSynchronization.ShouldDeleteFromMV
End Function
Public Sub Terminate() Implements
Microsoft.MetadirectoryServices.IMVSynchronization.Terminate
End Sub
End Class
from domain1 (here a 'company.net') to domain2 (here:test.net) and both are
AD 2003 domains.
see my drawing for a quick graphical view
Loading Image...
I managed to import Users and Groups to the Metaverse with Management Agent
A.
The Import of additional userdate from Oracle wiht Management Agent B should
be done later.
Now I want to provision the Users/Groups from Metaverse to the Connector
Space.
In relation to the "Simple Account Provisioning"-Scenario from Microsoft, i
hacked code so far (which is at the end of this posting)
I compiled with F5 and put the MyProvision.dll in the <extensions>-folder.
In Identity Manager, I picked my dll for "Metaverse rule extension".
Q:
1. Does my code contains some obvious errors?
2. When does the metaverse extenstion proceeds? (may be a silly questions
but I am not really sure, if the extenstions is running)
3. What else must I probably to do make this Provisioning work? How must
Management Agent C look like (e.g. Run Profile Sync or Export?)
Thanks in advance,
Regards,
Oliver
----------------MY CODE---------------------
Imports Microsoft.MetadirectoryServices
Imports System.Xml
Public Class MyProvision
Implements IMVSynchronization
Public Sub Initialize() Implements
Microsoft.MetadirectoryServices.IMVSynchronization.Initialize
End Sub
Public Sub Provision(ByVal mventry As MVEntry) Implements
IMVSynchronization.Provision
' Get the number of connectors for this MVEntry object under
' this management agent
Dim ManagementAgent As ConnectedMA
Dim Connectors As Integer
Dim newCSEntry As CSEntry
Dim DN As ReferenceValue
Connectors = ManagementAgent.Connectors.Count
DN =
ManagementAgent.EscapeDNComponent(System.Guid.NewGuid().ToString)
If 0 = Connectors Then
' Create the new connector
newCSEntry =
ManagementAgent.Connectors.StartNewConnector("person")
' Assign the distinguished name
newCSEntry.DN = DN
' Finish creating the new connector
newCSEntry.CommitNewConnector()
ElseIf 1 = Connectors Then
' Assign the distinguished name using the existing connector
newCSEntry = ManagementAgent.Connectors.ByIndex(0)
newCSEntry.DN = DN
newCSEntry("LastName").Value = mventry("sn").Value
newCSEntry("givenName").Value = mventry("gn").Value
newCSEntry("sAMAccountName").Value = mventry("uid").Value
newCSEntry("description").Value = mventry("description").Value
Else
Dim ExceptionMessage As String
ExceptionMessage = "Multiple Connectors on Management Agent"
Throw New UnexpectedDataException(ExceptionMessage)
End If
End Sub
Public Function ShouldDeleteFromMV(ByVal newCSEntry As
Microsoft.MetadirectoryServices.CSEntry, ByVal mventry As
Microsoft.MetadirectoryServices.MVEntry) As Boolean Implements
Microsoft.MetadirectoryServices.IMVSynchronization.ShouldDeleteFromMV
End Function
Public Sub Terminate() Implements
Microsoft.MetadirectoryServices.IMVSynchronization.Terminate
End Sub
End Class