Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reques for help with small IIFP tweak.

57 views
Skip to first unread message

Dan Sheehan

unread,
Jun 13, 2007, 1:59:44 PM6/13/07
to
Greetings,
I am helping a customer set up a CompanyA <-> CompanyB IIFP GALSync.
So far everything is working great with one exception.
CompanyA uses the displayname standard of Lastname, Firstname.
CompanyB uses the displayname standard of Firstname Lastname.

I have tried doing som research, but the best answer I have found from
MSFT's website is to use something like this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mmsdev/mms/example__swapping_the_order_of_a_name.asp

I am an old programmer and avid scripter, but these examples leave me
in the dust.

Is there a simple way to modify the management agents for both
companys so that when the relevant data is exported to their
respective contacts container, it is done so with the displayname
format that company uses?
If I were to write the logic for CompanyA's export to AD, I would use
the following syntax:
IF givenname=* & sn=* then displayname="sn, givenname"
ELSE displayname=displayname (so that groups don't get messed up).

Thanks!!!!
Dan Sheehan
MCSE 2003 + Messaging

Dmitry Kazantsev

unread,
Jun 13, 2007, 7:28:00 PM6/13/07
to
During contact provisioning into AD of partner organization you'll need to
specify new format for your "displayName" attribute.

You can use Advance import flow (or export flow) depending on where you want
to change format of the display name to flip the name.

You might want to look into "givenName" and "sn" attributes instead of
splitting existing display name value.

Let me know if this is not very clear.

Regards,

--
Dmitry Kazantsev
Senior Consultant
Oxford Computer Group

Dan Sheehan

unread,
Jun 18, 2007, 9:18:50 AM6/18/07
to
On Jun 13, 7:28 pm, Dmitry Kazantsev

<DmitryKazant...@discussions.microsoft.com> wrote:
> During contact provisioning into AD of partner organization you'll need to
> specify new format for your "displayName" attribute.
>
> You can use Advance import flow (or export flow) depending on where you want
> to change format of the display name to flip the name.
>
> You might want to look into "givenName" and "sn" attributes instead of
> splitting existing display name value.
>
> Let me know if this is not very clear.
>
> Regards,
>
> --
> Dmitry Kazantsev
> Senior Consultant
> Oxford Computer Group
>
>
>
> "Dan Sheehan" wrote:
> > Greetings,
> > I am helping a customer set up a CompanyA <-> CompanyB IIFP GALSync.
> > So far everything is working great with one exception.
> > CompanyA uses the displayname standard of Lastname, Firstname.
> > CompanyB uses the displayname standard of Firstname Lastname.
>
> > I have tried doing som research, but the best answer I have found from
> > MSFT's website is to use something like this:
> >http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mmsd...

>
> > I am an old programmer and avid scripter, but these examples leave me
> > in the dust.
>
> > Is there a simple way to modify the management agents for both
> > companys so that when the relevant data is exported to their
> > respective contacts container, it is done so with the displayname
> > format that company uses?
> > If I were to write the logic for CompanyA's export to AD, I would use
> > the following syntax:
> > IF givenname=* & sn=* then displayname="sn, givenname"
> > ELSE displayname=displayname (so that groups don't get messed up).
>
> > Thanks!!!!
> > Dan Sheehan
> > MCSE 2003 + Messaging- Hide quoted text -
>
> - Show quoted text -

Thank you for responding!!! :)

I did try to monkey around with the display name attribute on the
export direction (fromt the Metaverse to the AD), but I didn't get the
formatting right because I got an error.
Can you give me an example of the syntax to set "DisplayName=sn,
givenname"?

Thanks again for responding!!!

Dan Sheehan

unread,
Jun 18, 2007, 9:58:26 AM6/18/07
to
And just so I head off the question at the pass, here is what I did.

Under the Contacts <- Person section of the attribute flow, I modified
the displayName <- displayName direct attribute mapping to be an
advanced, and then multi-selected the givenName and sn. This
automatically created the "rule" of:
cd.contact:displayName<-mv.person:sn,givenName
However when I run a full import and synch, I ge tthe error "extension-
unexpected-attribute-value". This is apparently an issue with the
GALSync.dll attribute flow.

I tried using the contstant values of "sn, givenName", but all that
did was change everyone's display name to litterally "sn, givenName".
LOL! :)

So does that help you at all in regards to figuring out what I am
doing wrong??


Michael D'Angelo

unread,
Jun 18, 2007, 10:51:31 AM6/18/07
to
You will need to use your own Rules Extension project in order to do this.

The code would look like this (in C#):

void MapAttributesForImport(string FlowRuleName, MVEntry mventry, CSEntry
csentry)
{
if(FlowRuleName == "cd.contact:displayName<-mv.person:sn,givenName")
{
csentry["displayName"].Value = mventry["sn"].Value + ", " +
mventry["givenName"].Value;
}
}

"Dan Sheehan" <shee...@sheehans.org> wrote in message
news:1182175106....@q75g2000hsh.googlegroups.com...

Dan Sheehan

unread,
Jun 18, 2007, 11:24:18 AM6/18/07
to
On Jun 18, 10:51 am, "Michael D'Angelo"

<nospamnmda...@phoenixworx.org> wrote:
> You will need to use your own Rules Extension project in order to do this.
>
> The code would look like this (in C#):
>
> void MapAttributesForImport(string FlowRuleName, MVEntry mventry, CSEntry
> csentry)
> {
> if(FlowRuleName == "cd.contact:displayName<-mv.person:sn,givenName")
> {
> csentry["displayName"].Value = mventry["sn"].Value + ", " +
> mventry["givenName"].Value;
> }
>
> }
> - Show quoted text -

Thank you for the code example.
Upon trying to create this Rules Extension Project in the lab , it
looks like it attempts to replace the GALSync.DLL rules extension
project. Is there a way to copy everything out of the existing DLL so
you can just add on a few new functions, or do I have to completely
dump the GALSync.DLL and start over from scratch? The reason I ask is
because the GALSync.DLL is doing quite a bit of pre-configured
operations that I would have no clue how to re-create from scratch and
the process would grind to a halt. So if I could add on to it then I
wouldn't have to worry, otherwise I am going to run into issues.
I did do a quick couple of google searches to see if I could find the
GALSync project source so that I might add on to it, but I was unable
to locate it.

Dan Sheehan

unread,
Jun 18, 2007, 12:01:56 PM6/18/07
to
> to locate it.- Hide quoted text -

>
> - Show quoted text -

Ok - I found the original GALSync source on the server (phew).
I found the section that has the VB coding for MapAttributesForImport.
If I understand things correctly, I should just be able to add in some
additional code into this section, and recompile it to a new DLL.
Here is what I am thinking for the code:
Case "cd.contact:displayName<-mv.person:sn,givenName"
IF mventry("sn").length > 0 And mventry("givenName") > 0 then
csentry("displayName").Value = mventry("sn").Value + ", " +
mventry("givenName").Value
ELSE
Csentry("displayName").value = mventry("displayName");
End if
End Select

Case "cd.contact:displayName<-mv.person:givenNamesn"
IF mventry("sn").length > 0 And mventry("givenName") > 0 then
csentry("displayName").Value = mventry("givenName").Value + " " +
mventry("sn").Value
ELSE
Csentry("displayName").value = mventry("displayName");
End if
End Select

So it handles the change of "Lastname, Firstname" to "Firstname
Lastname" when called, and also "Firstname Lastname" to "Lastname,
Firstname" when called. In either scenario if the length of either the
Firstname or Lastname of the metaverse object isn't bigger than 0 (aka
is it blank), then the current displayname isused.
If that looks correct, how would I recompile the code into a new DLL
on the server. Forgive my ignorance but this is all new to me.

Thanks for the help!

Michael D'Angelo

unread,
Jun 18, 2007, 3:24:13 PM6/18/07
to

"Dan Sheehan" <shee...@sheehans.org> wrote in message
news:1182182516....@q75g2000hsh.googlegroups.com...


That code looks correct, although you should use .IsPresent instead of
.length > 0

To compile the code, you'll need a VB.NET compiler. If you are running MIIS
SP1, it is going to need to be .NET 1.1, so if you don't want to pay for
Visual Studio .NET 2003, you'll need to download the .NET 1.1 SDK and use
the command-line compiler.

With MIIS SP2, MIIS uses .NET 2.0, so you should be able to use Visual Basic
Express Edition to compile the project.


Dan Sheehan

unread,
Jun 19, 2007, 8:33:42 AM6/19/07
to
On Jun 18, 3:24 pm, "Michael D'Angelo" <nospamnmda...@phoenixworx.org>
wrote:
> "Dan Sheehan" <sheeh...@sheehans.org> wrote in message
> Express Edition to compile the project.- Hide quoted text -

>
> - Show quoted text -

Thank you again for the repeated support!
I will switch the .vaule>0 to .ispresent as that is logic processing
by the code. :)

I am running IIFP SP2.
I installed Visual Studios .NET 2005 Express (the VB version) on my
desktop yesterday only to find that it couldn't find all the code it
wanted when I went to compile the new DLL. It also wanted to upgrade
the GALSync VB source code that I was using. So is Visual Studios .NET
2005 bad? Should I use 2003?
In either case I will be installing it on the server with IIFP so that
I don't have to worry about which file I copied over to my desktop.
This is all in the lab as well, so once the DLL is working properly,
we won't have to worry about installing Visual Studios .NET on the
production server.

One last question. Does this code belong in the import section or the
export section. I don't mind if the objects are created in the
metaverse with the original displayname, just that when they are
pushed to specific directories that they have the display name altered
then. I know that the process of populating/updating AD is called an
export, which is what prompted this question.

Thanks again!

Michael D'Angelo

unread,
Jun 19, 2007, 9:49:55 AM6/19/07
to

"Dan Sheehan" <shee...@sheehans.org> wrote in message
news:1182256422.1...@p77g2000hsh.googlegroups.com...

MIIS SP1 was .NET 1.1, but SP2 is now .NET 2.0 so you can upgrade. If it is
complaining about not being able to find something, most likely you need to
add a reference to Microsoft.MetadirectoryServices.dll in the project.

Based on the text of the rule name, this goes in MapAttributesForExport


Dan Sheehan

unread,
Jun 19, 2007, 10:50:33 AM6/19/07
to
On Jun 19, 9:49 am, "Michael D'Angelo" <nospamnmda...@phoenixworx.org>
wrote:
> Based on the text of the rule name, this goes in MapAttributesForExport- Hide quoted text -

>
> - Show quoted text -

Ok - as soon as I get Internet connectivity to the lab (MSFT requires
that the Visual Studios .NET 2005 Express edition be a partial web
install), I will compile the code changes into a new DLL (after
upgrading the VB code because VS .NET 2005 complains if you don't). I
will also move the code to the export section.

*crossing fingers*

Thanks!

Dan Sheehan

unread,
Jun 19, 2007, 1:48:31 PM6/19/07
to
> Thanks!- Hide quoted text -

>
> - Show quoted text -

Nothing is ever easy. ;-)

I installed VB Studio .NET 2005 Express VB edition in the lab, let it
upgrade the GALSync source, and made the changes to the GALMA.VB file
which is part of the GALSync source.
So here is the exact code I used (I cleaned it up a little once I got
the VB Studio .NET 2005 Express on the server and could look at the
code better) in the export section:


Case "cd.contact:displayName<-mv.person:sn,givenName"

If mventry("sn").IsPresent And mventry("givenName").IsPresent Then


csentry("displayName").Value = mventry("sn").Value + ", " +
mventry("givenName").Value

Else
csentry("displayName").Value = mventry("displayName").Value
End If

Case "cd.contact:displayName<-mv.person:givenNamesn"

If mventry("sn").ispresent And mventry("givenName").ispresent then


csentry("displayName").Value = mventry("givenName").Value + " " +
mventry("sn").Value

Else
csentry("displayName").Value = mventry("displayName").Value
End If

This is all before the "Case Else" in the Export section.

And now the Full Import and Syncrhonization runs succesfully, but it
isn't seeing new objects I have created. In fave when I go look at the
jobs history, I see that I get an error even though the process seems
to have run correctly. Here is the error:
<step-result>stopped-extension-dll-exception</step-result>
So how can I find out what's wrong or what MIIS didn't like?

I am so close... :-)

Dan Sheehan

unread,
Jun 19, 2007, 2:20:32 PM6/19/07
to
> I am so close... :-)- Hide quoted text -

>
> - Show quoted text -

Ok well that was dumb....
When I compile the new GALSync.DLL, it created a new GALSync.XML file
as well. I backed up the old GALSync.* files in the Extensions
directory, and cut and paste the two new files in place. Apparently
the new GALSync.XML didn't have the information that the old one had
about the agent configuration, so I had to swap them out. Once I did,
all the users in both directions start doing EXACTLY what I wanted
them to do. Lastname, Firstname -> Firstname Lastname and Firstname
Lastname -> Lastname, Firstname.

I did run into one snag I am hoping I can get some help with. The
mailboxes w/o a first name and last name are generating an error. Here
is the error from MIIS:
Microsoft.MetadirectoryServices.AttributeNotDefinedAsSourceException:
Attribute "displayName" is not declared as a dependency.
at Microsoft.MetadirectoryServices.Impl.MVEntryImpl.get_Item(String
attributeName)
at
Microsoft.MetadirectoryServices.GALSync.MASynchronizer.MapAttributesForExport(String


FlowRuleName, MVEntry mventry, CSEntry csentry)

Can someone tell me what I am doing wrong with the code above that
MIIS doesn't like the attribute "displayName" when I try to pull it
from the mventry object?

BTW - when all is said and done, I am going to post the exact steps to
take to reproduce this as I am sure others will run into this scenario
as well.

Thanks again for all your support!
Dan.

Michael D'Angelo

unread,
Jun 19, 2007, 2:27:52 PM6/19/07
to

"Dan Sheehan" <shee...@sheehans.org> wrote in message
news:1182277232....@c77g2000hse.googlegroups.com...

You don't need to modify the code actually. In Identity Manager, edit your
attribute flow and include the metaverse displayName attribute in addition
to sn and givenName.


Dan Sheehan

unread,
Jun 19, 2007, 2:49:47 PM6/19/07
to
On Jun 19, 2:27 pm, "Michael D'Angelo" <nospamnmda...@phoenixworx.org>
wrote:

> You don't need to modify the code actually. In Identity Manager, edit your
> attribute flow and include the metaverse displayName attribute in addition
> to sn and givenName.

Believe it or not, I did a google search on the error I reported, and
found out exactly what you suggested. Thank you for responding with it
anyway, and I apologize for not searching for it first. My head is
swimming with MIIS as this is all starting to make sense in a very
scary way.

It is working EXACTLY as I had hoped now. So thank you all very much
for your help, guidance, and patience!

Any, I will post all of the steps I did to make this happen once I
have finished updating the documentation. If nothing else the next
admin to come along will hopefully stumble on the post and not need to
recreate my steps.

Thanks,

Dan Sheehan

unread,
Jul 11, 2007, 9:21:59 AM7/11/07
to

Here are the exact steps I used when creating this custom GALSync
process:
Preparing the Environment
The requirements for this process are as follows:
1. Windows 2003 Enterprise Edition Server (MIIS/IIFP requires the use
of Enterprise Edition for licensing reasons).
2. SQL 2005. While Standard edition was used in the lab, it is
reported that the SQL MSDE version is adequate as well.
3. Microsoft Identity Integration Feature Pack (IIFP) version 2
located at http://www.microsoft.com/downloads/details.aspx?familyid=D9143610-C04D-41C4-B7EA-6F56819769D5&displaylang=en
4. Create a target OU in each forest in which contacts for objects in
the other forest will be created.
5. One account in each forest with the ability to read all the
relevant objects in that forest, and that has the ability to create
objects the OU specified above. Generally most people use a Domain
Admin in both forests, but this is not a requirement.
6. Microsoft Visual Studio .NET 2005 Express Edition (the Visual Basic
version) located at http://www.microsoft.com.

When SQL 2005 is installed, it should be configured for mixed mode
authentication. It is also assumed that all of the latest service
packs and hot fixes are used for all products involved.
Customizing the IIFP GALSync Process
The IIFP comes with a pre-configured GALSync module that Microsoft
has compiled to perform AD to AD directory synchronization. This
synchronization performs an attribute per attribute copy between the
two forests, however this is not sufficient for CompanyA and CompanyB
as both entities have differing GAL Display Name standards. CompanyA
uses the Display Name standard of "Firstname Lastname" while CompanyB
uses the standard of "Lastname, Firstname". Therefore the Microsoft
provided GALSync module must be modified to accommodate this differing
standard when creating contacts in their respective target ADs. To
accomplish this customizations, perform the following steps:
1. Make a backup copy of the original GALSync folder located at C:
\Program Files\Microsoft Identity Integration Server\SourceCode
\GALSync.
2. Using Visual Studios .NET 2005, open the GALSync.sln project file
in the folder mentioned above, allowing the program to upgrade the
source code.
3. Open to the sub file GALMA.vb in the Solution Explorer pane on the
right hand side of the console.
4. Perform a search for the Public Sub section called
"MapAttributesForExport".
5. Scroll down and find the "Case Else". Once there, paste the
following code BEFORE the Case Else statement:


Case "cd.contact:displayName<-mv.person:sn,givenName"
If mventry("sn").IsPresent And
mventry("givenName").IsPresent Then
csentry("displayName").Value =
mventry("sn").Value + ", " + mventry("givenName").Value
Else
csentry("displayName").Value =
mventry("displayName").Value
End If

Case "cd.contact:displayName<-mv.person:givenNamesn"
If mventry("sn").ispresent And
mventry("givenName").ispresent then
csentry("displayName").Value =
mventry("givenName").Value + " " + mventry("sn").Value
Else
csentry("displayName").Value =
mventry("displayName").Value
End If

6. From the toolbar select Project and then Build. This will create a
new GALSync.DLL which will be store in the folder mentioned above.
Once it completes, close the Visual Studios .NET 2005 console.

7. Copy GALSync.DLL to the C:\Program Files\Microsoft Identity
Integration Server\Extensions folder, and say yes to overwrite the
original GALSync.DLL (the original DLL is also in the folder that was
backed up in step 1.

At this point the customization of the GALSync process provided by
Microsoft is complete.

Configuring IIFP
Using the IIFP console, create a management agent for each AD forest
using following the guidelines.
1. Open the IIFP console, and under the Management Agents (MA) "tab",
select the Create option from the right hand side Actions Menu.
2. Specify the that this is a MA for an "Active Directory global
address list (GAL)", and choose an appropriate name (and description
if desired) of the MA and then select Next.
3. Specify the credentials the MA will use to attach to the forest
using the credentials of the service accounts designated for the
GALSync process.
4. Select the "Options" button, turn off all options.
5. Select Next.
6. Select the appropriate directory partitions that house the mail
enabled resources that should be sync'ed.
7. Check the "Only use preferred domain controllers" checkbox, and use
the "Configure" button to designate the preferred domain controllers
for each directory partition (use a minimum of two for redundancy).
8. Use the "Set Credentials" button to specify the service account to
use when connecting with the selected AD partitions.
9. Use the "Containers" button to designate the OUs that contain the
mail enabled objects that should be synced to the target AD, as well
as the OU where incoming contacts should be placed, and then Next.
10. Use the "Target" button to specify the appropriate target OU for
new contacts.
11. Use the "Edit" button to specify the primary SMTP address space
used by the mail recipients of the forest, and select Next.
12. Take the default unless specific objects should not be synched,
and select Next:
13. Again take the defaults unless specific attributes should not be
synched, and select Next.
14. Take the defaults and select Next.
15. Again take the defaults and select Next
16. Expand out the line that has "Object Type: contact" in the Data
Source Attribute column, and "Object Type: person in the Metaverse
Attribute column.
17. Select the displayName attribute and switch it's Mapping Type from
Direct to Advanced. Then multi-select the attributes givenName and sn
from the Metaverse object attribute list.
18. Now select the "Edit" button and you should see the rule name has
a similar name to "cd.contact:displayName<-mv.person:givenNamesn".
a. If this is the CompanyA agent, then the rule name needs to be
exactly as follows:
cd.contact:displayName<-mv.person:givenNamesn
This leverages the "Firstname Lastname" coding rule with the same
name.
b. If this is the CompanyB agent, then the rule name needs to be
exactly as follows:
cd.contact:displayName<-mv.person:sn,givenName
This leverages the "Lastname, Firstname" coding rule with the same
name.
19. Now that the rule is named properly, go back and add the
displayName attribute to the multi-select in the Metaverse Attribute
list so that there are now three. This attribute is added separately
because automatic the rule name generation should only have the two
attributes listed at the end which makes editing the name (if
necessary) much easier. Notice that all three attributes are now
listed in the Metaverse Attribute column under the Configure Attribute
Flow table.
20. Select Next.
21. Take the defaults on the next two screens selecting Next until the
agent creation is finished.
22. Repeat the steps to create a second MA for the other AD Forest.
23. Once both MAs are created, right mouse click on them and select
Run. This will bring up a menu that lists several choices. For both
MAs, perform the following steps on each MA one at a time before
moving to the next step. Example, step A should be performed on the
first MA, and then the second once the first MA is finished, before
moving on to step B.
a. Full Import (Stage Only).
b. Full Synchronization.
24. Switch to the Metaverse "tab" at the top of the console, and
perform a search for cn=*. This should return all the objects in the
Metaverse, and allow a quick check to make sure all the objects are in
there that should be.
25. If there are no problems detected with an examination of the
Metaverse, then in the main console select Tools, Options, and then
the check box for Enable Provision Rules Extension
26. For both MAs, perform the following steps on each MA one at a time
before moving to the next step. Example, step A should be performed on
the first MA, and then the second once the first MA is finished, then
moving on to step B.
a. Full Import (Stage Only).
b. Full Synchronization.
c. Export.
d. Delta Import.
27. Confirm that all the contacts were created successfully, and that
there are no missing objects.
28. Once the objects are confirmed as having been created successfully
in each forest, right mouse click the CompanyA MA and select
"Configure Run Profiles".
29. Highlight the "Full Import (Stage Only)" process and click the
Script button.
30. Save the script name to a folder on the server, calling it
COMPANYA_FullImport.VBS.
31. Repeat the steps above for the "Full Synchronization", "Export",
and "Delta Import" processes.
32. Create the same four files for the CompanyB MA.
33. Create a batch file containing the following lines:
START /WAIT CSCRIPT.EXE COMPANYA_FullImport.VBS
START /WAIT CSCRIPT.EXE COMPANYB_FullImport.VBS
START /WAIT CSCRIPT.EXE COMPANYA_FullSynchronization.VBS
START /WAIT CSCRIPT.EXE COMPANYB_FullSynchronization.VBS
START /WAIT CSCRIPT.EXE COMPANYA_Export.VBS
START /WAIT CSCRIPT.EXE COMPANYB_Export.VBS
START /WAIT CSCRIPT.EXE COMPANYA_DeltaImport.VBS
START /WAIT CSCRIPT.EXE COMPANYB_DeltaImport.VBS
34. Schedule the batch file to run at 4AM every day using credentials
that have administrative access to the server.

I hope that helps.

Roman

unread,
Jul 3, 2008, 1:11:17 AM7/3/08
to
I have been trying to accomplish the same task of switching DisplayName attributes during IIFP synchronization. Your post and instructional walk-thru have proved invaluable, and your instructions are flawless. Thank you for taking the time to share your experiences. RjZ

Sabra Gryzbowski

unread,
Jul 26, 2010, 3:55:27 PM7/26/10
to
Hi Dan, by followin your step as in
http://www.eggheadcafe.com/software/aspnet/30154518/reques-for-help-with-small-iifp-tweak.aspx

4. Perform a search for the Public Sub section called

5. Scroll down and find the "Case Else". Once there, paste the
following code BEFORE the Case Else statement:
Case "cd.contact:displayName<-mv.person:sn,givenName"
If mventry("sn").IsPresent And
mventry("givenName").IsPresent Then
csentry("displayName").Value =
mventry("sn").Value + ", " + mventry("givenName").Value
Else
csentry("displayName").Value =
mventry("displayName").Value
End If

Case "cd.contact:displayName<-mv.person:givenNamesn"
If mventry("sn").ispresent And
mventry("givenName").ispresent then
csentry("displayName").Value =
mventry("givenName").Value + " " + mventry("sn").Value
Else
csentry("displayName").Value =
mventry("displayName").Value
End If

I could not find Public Sub section

I do have IIFP sp2 and what am I missing?

Thank you.

Dan Sheehan wrote:

Re: Reques for help with small IIFP tweak.
11-Jul-07

I hope that helps.

Previous Posts In This Thread:

On Wednesday, June 13, 2007 1:59 PM
Dan Sheehan wrote:

Reques for help with small IIFP tweak.


Greetings,
I am helping a customer set up a CompanyA <-> CompanyB IIFP GALSync.
So far everything is working great with one exception.
CompanyA uses the displayname standard of Lastname, Firstname.
CompanyB uses the displayname standard of Firstname Lastname.

I have tried doing som research, but the best answer I have found from
MSFT's website is to use something like this:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mmsdev/mms/example__swapping_the_order_of_a_name.asp

I am an old programmer and avid scripter, but these examples leave me
in the dust.

Is there a simple way to modify the management agents for both
companys so that when the relevant data is exported to their
respective contacts container, it is done so with the displayname
format that company uses?
If I were to write the logic for CompanyA's export to AD, I would use
the following syntax:
IF givenname=* & sn=* then displayname="sn, givenname"
ELSE displayname=displayname (so that groups don't get messed up).

Thanks!!!!


Dan Sheehan
MCSE 2003 + Messaging

On Wednesday, June 13, 2007 7:28 PM
DmitryKazantse wrote:

RE: Reques for help with small IIFP tweak.


During contact provisioning into AD of partner organization you'll need to
specify new format for your "displayName" attribute.

You can use Advance import flow (or export flow) depending on where you want
to change format of the display name to flip the name.

You might want to look into "givenName" and "sn" attributes instead of
splitting existing display name value.

Let me know if this is not very clear.

Regards,

--
Dmitry Kazantsev
Senior Consultant
Oxford Computer Group


"Dan Sheehan" wrote:

On Monday, June 18, 2007 9:18 AM
Dan Sheehan wrote:

Re: Reques for help with small IIFP tweak.

Thanks again for responding!!!

On Monday, June 18, 2007 9:58 AM
Dan Sheehan wrote:

Re: Reques for help with small IIFP tweak.


And just so I head off the question at the pass, here is what I did.

Under the Contacts <- Person section of the attribute flow, I modified
the displayName <- displayName direct attribute mapping to be an
advanced, and then multi-selected the givenName and sn. This
automatically created the "rule" of:
cd.contact:displayName<-mv.person:sn,givenName
However when I run a full import and synch, I ge tthe error "extension-
unexpected-attribute-value". This is apparently an issue with the
GALSync.dll attribute flow.

I tried using the contstant values of "sn, givenName", but all that
did was change everyone's display name to litterally "sn, givenName".
LOL! :)

So does that help you at all in regards to figuring out what I am
doing wrong??

On Monday, June 18, 2007 10:51 AM
Michael D'Angelo wrote:

Re: Reques for help with small IIFP tweak.


You will need to use your own Rules Extension project in order to do this.

The code would look like this (in C#):

void MapAttributesForImport(string FlowRuleName, MVEntry mventry, CSEntry
csentry)
{
if(FlowRuleName == "cd.contact:displayName<-mv.person:sn,givenName")
{
csentry["displayName"].Value = mventry["sn"].Value + ", " +
mventry["givenName"].Value;
}
}

"Dan Sheehan" <shee...@sheehans.org> wrote in message
news:1182175106....@q75g2000hsh.googlegroups.com...

On Monday, June 18, 2007 11:24 AM
Dan Sheehan wrote:

Re: Reques for help with small IIFP tweak.
On Jun 18, 10:51 am, "Michael D'Angelo"
<nospamnmda...@phoenixworx.org> wrote:

Thank you for the code example.
Upon trying to create this Rules Extension Project in the lab , it
looks like it attempts to replace the GALSync.DLL rules extension
project. Is there a way to copy everything out of the existing DLL so
you can just add on a few new functions, or do I have to completely
dump the GALSync.DLL and start over from scratch? The reason I ask is
because the GALSync.DLL is doing quite a bit of pre-configured
operations that I would have no clue how to re-create from scratch and
the process would grind to a halt. So if I could add on to it then I
wouldn't have to worry, otherwise I am going to run into issues.
I did do a quick couple of google searches to see if I could find the
GALSync project source so that I might add on to it, but I was unable
to locate it.

On Monday, June 18, 2007 12:01 PM
Dan Sheehan wrote:

Re: Reques for help with small IIFP tweak.


On Jun 18, 11:24 am, Dan Sheehan <sheeh...@sheehans.org> wrote:

Ok - I found the original GALSync source on the server (phew).
I found the section that has the VB coding for MapAttributesForImport.
If I understand things correctly, I should just be able to add in some
additional code into this section, and recompile it to a new DLL.
Here is what I am thinking for the code:

Case "cd.contact:displayName<-mv.person:sn,givenName"

IF mventry("sn").length > 0 And mventry("givenName") > 0 then
csentry("displayName").Value = mventry("sn").Value + ", " +
mventry("givenName").Value


ELSE
Csentry("displayName").value = mventry("displayName");
End if
End Select

Case "cd.contact:displayName<-mv.person:givenNamesn"
IF mventry("sn").length > 0 And mventry("givenName") > 0 then


csentry("displayName").Value = mventry("givenName").Value + " " +
mventry("sn").Value

ELSE
Csentry("displayName").value = mventry("displayName");
End if
End Select

So it handles the change of "Lastname, Firstname" to "Firstname
Lastname" when called, and also "Firstname Lastname" to "Lastname,
Firstname" when called. In either scenario if the length of either the
Firstname or Lastname of the metaverse object isn't bigger than 0 (aka
is it blank), then the current displayname isused.
If that looks correct, how would I recompile the code into a new DLL
on the server. Forgive my ignorance but this is all new to me.

Thanks for the help!

On Monday, June 18, 2007 3:24 PM
Michael D'Angelo wrote:

Re: Reques for help with small IIFP tweak.


"Dan Sheehan" <shee...@sheehans.org> wrote in message

news:1182182516....@q75g2000hsh.googlegroups.com...


That code looks correct, although you should use .IsPresent instead of

..length > 0

To compile the code, you'll need a VB.NET compiler. If you are running MIIS
SP1, it is going to need to be .NET 1.1, so if you don't want to pay for
Visual Studio .NET 2003, you'll need to download the .NET 1.1 SDK and use
the command-line compiler.

With MIIS SP2, MIIS uses .NET 2.0, so you should be able to use Visual Basic
Express Edition to compile the project.

On Tuesday, June 19, 2007 8:33 AM
Dan Sheehan wrote:

Re: Reques for help with small IIFP tweak.
On Jun 18, 3:24 pm, "Michael D'Angelo" <nospamnmda...@phoenixworx.org>
wrote:

Thank you again for the repeated support!


I will switch the .vaule>0 to .ispresent as that is logic processing
by the code. :)

I am running IIFP SP2.
I installed Visual Studios .NET 2005 Express (the VB version) on my
desktop yesterday only to find that it couldn't find all the code it
wanted when I went to compile the new DLL. It also wanted to upgrade
the GALSync VB source code that I was using. So is Visual Studios .NET
2005 bad? Should I use 2003?
In either case I will be installing it on the server with IIFP so that
I don't have to worry about which file I copied over to my desktop.
This is all in the lab as well, so once the DLL is working properly,
we won't have to worry about installing Visual Studios .NET on the
production server.

One last question. Does this code belong in the import section or the
export section. I don't mind if the objects are created in the
metaverse with the original displayname, just that when they are
pushed to specific directories that they have the display name altered
then. I know that the process of populating/updating AD is called an
export, which is what prompted this question.

Thanks again!

On Tuesday, June 19, 2007 9:49 AM
Michael D'Angelo wrote:

Re: Reques for help with small IIFP tweak.


"Dan Sheehan" <shee...@sheehans.org> wrote in message

news:1182256422.1...@p77g2000hsh.googlegroups.com...

MIIS SP1 was .NET 1.1, but SP2 is now .NET 2.0 so you can upgrade. If it is
complaining about not being able to find something, most likely you need to
add a reference to Microsoft.MetadirectoryServices.dll in the project.

Based on the text of the rule name, this goes in MapAttributesForExport

On Tuesday, June 19, 2007 10:50 AM
Dan Sheehan wrote:

Re: Reques for help with small IIFP tweak.
On Jun 19, 9:49 am, "Michael D'Angelo" <nospamnmda...@phoenixworx.org>
wrote:

Ok - as soon as I get Internet connectivity to the lab (MSFT requires


that the Visual Studios .NET 2005 Express edition be a partial web
install), I will compile the code changes into a new DLL (after
upgrading the VB code because VS .NET 2005 complains if you don't). I
will also move the code to the export section.

*crossing fingers*

Thanks!

On Tuesday, June 19, 2007 1:48 PM
Dan Sheehan wrote:

Re: Reques for help with small IIFP tweak.


On Jun 19, 10:50 am, Dan Sheehan <sheeh...@sheehans.org> wrote:

Nothing is ever easy. ;-)

I installed VB Studio .NET 2005 Express VB edition in the lab, let it
upgrade the GALSync source, and made the changes to the GALMA.VB file
which is part of the GALSync source.
So here is the exact code I used (I cleaned it up a little once I got
the VB Studio .NET 2005 Express on the server and could look at the
code better) in the export section:

Case "cd.contact:displayName<-mv.person:sn,givenName"
If mventry("sn").IsPresent And mventry("givenName").IsPresent Then
csentry("displayName").Value = mventry("sn").Value + ", " +
mventry("givenName").Value
Else
csentry("displayName").Value = mventry("displayName").Value
End If

Case "cd.contact:displayName<-mv.person:givenNamesn"
If mventry("sn").ispresent And mventry("givenName").ispresent then
csentry("displayName").Value = mventry("givenName").Value + " " +
mventry("sn").Value
Else
csentry("displayName").Value = mventry("displayName").Value
End If

This is all before the "Case Else" in the Export section.

And now the Full Import and Syncrhonization runs succesfully, but it
isn't seeing new objects I have created. In fave when I go look at the
jobs history, I see that I get an error even though the process seems
to have run correctly. Here is the error:
<step-result>stopped-extension-dll-exception</step-result>
So how can I find out what's wrong or what MIIS didn't like?

I am so close... :-)

On Tuesday, June 19, 2007 2:20 PM
Dan Sheehan wrote:

Re: Reques for help with small IIFP tweak.

On Tuesday, June 19, 2007 2:27 PM
Michael D'Angelo wrote:

Re: Reques for help with small IIFP tweak.


"Dan Sheehan" <shee...@sheehans.org> wrote in message
news:1182277232....@c77g2000hse.googlegroups.com...

You don't need to modify the code actually. In Identity Manager, edit your

attribute flow and include the metaverse displayName attribute in addition
to sn and givenName.

On Tuesday, June 19, 2007 2:49 PM
Dan Sheehan wrote:

Re: Reques for help with small IIFP tweak.


On Jun 19, 2:27 pm, "Michael D'Angelo" <nospamnmda...@phoenixworx.org>
wrote:

Believe it or not, I did a google search on the error I reported, and


found out exactly what you suggested. Thank you for responding with it
anyway, and I apologize for not searching for it first. My head is
swimming with MIIS as this is all starting to make sense in a very
scary way.

It is working EXACTLY as I had hoped now. So thank you all very much
for your help, guidance, and patience!

Any, I will post all of the steps I did to make this happen once I
have finished updating the documentation. If nothing else the next
admin to come along will hopefully stumble on the post and not need to
recreate my steps.

Thanks,
Dan Sheehan
MCSE 2003 + Messaging

On Wednesday, July 11, 2007 9:21 AM
Dan Sheehan wrote:

Re: Reques for help with small IIFP tweak.

I hope that helps.

On Thursday, July 03, 2008 1:11 AM
Roman wrote:

Thank You!


I have been trying to accomplish the same task of switching DisplayName attributes during IIFP synchronization. Your post and instructional walk-thru have proved invaluable, and your instructions are flawless. Thank you for taking the time to share your experiences. RjZ


Submitted via EggHeadCafe - Software Developer Portal of Choice
Win A Free License of SandDock for Silverlight
http://www.eggheadcafe.com/tutorials/aspnet/b603164c-1365-45cf-aee7-a5df6d6cf704/win-a-free-license-of-sanddock-for-silverlight.aspx

0 new messages