Welcome to MSDN Blogs Sign in | Join | Help

Support for Cross-forest deployments

One of the deployment scenarios that we were pretty naive about in SPS 2003 was the deployment of SPS in the enterprise with multiple forests. Part of why that happened was because we miscalculated how we thought AD deployments would happen.

At the beginning of the O11 planning cycle (spring 2001), we asked the AD guys about what we should support and we got a clear message that we should be targeting single forests (not because multiple forests didn't exist, but because the AD team was encouraging folks to move to a single forest). Near the end of the release cycle of O11 (summer 2003), it was pretty clear multiple forests were going to be with us for a long time. That left us with very little time to address this deployment scenario.

You can see this naivete in two different places:

People picker
            Can only pick from one forest, the one in which the Sharepoint Server is deployed on

Profiles and MySites
            
Create a MySite and Profile page for each account even though they are for the same person
            Org. Charts on the profile page contain incomplete or duplicate entries
            Audience targeting works inconsistently for folks who have multiple login accounts   

So what are we going to do about it?

First we reduced the many multi-forest topologies to two basic types:

1. Resource Forest
            This happens when the Sharepoint deployment is done in a separate forest from the login accounts. This deployment is often driven by the way Exchange and LCS are deployed in the corporation. The Sharepoint/Exchange/LCS forest has shadown, non-login accounts that contain the metadata about the user, but the user actually logs in to a separate forest. The resource forest trusts the login forest, but not the other way around.

2. Multi-login Forests
            This happens when there are one or more forests that trust each other, but a single person has accounts in more than one forest. This could happen in many ways, an instructive example is in an merger or acquisition. Both companies had their own forest and after the merger/acquisition, the forests were made to trust each together. Lots of apps depend on the forest structure, so for some people accounts are given in both forests to access the apps.

 

Note: The right domain should be called Domain2

Now, let's a take look at the two problem areas: 

People Picker
Note: This feature is present in Beta2

For the people picker, WSS now allows you to pick people from multiple forests (even across the wrong way of a 1-way trust). The way they do this is by registering your forest and the credentials required to access it for a given Web App via the stsadm tool.

 > stsadm.exe -o setproperty -url http://server:port -pn "peoplepicker-searchadforests" -pv "forest:foo.corp.com;domain:bar.foo.corp.com", LoginName, P@ssword

The people picker code will basically iterate through each and every forest (or auth provider) until is resolves a given username. This allows for a simple model to pick people across both the resource forest and multi-login forest topologies.

People and Personalization features
Note: This feature MAY not be in Beta2

Office Server has a number of resources/objects that are identified with a person -- his profile, colleagues, org. hierarchy, mysite, audiences, etc. Multiple forests generate more than one identifier for the same person - different login name, different SID. 

So, the problem is how to reconcile the two accounts to one consistent user experience.

In the resource forest case:

When we import a User object from the Resource forest, we create a profile that is ID'd by resource\user1. However, we need to identify it by the real login account of the user, corp\user1, so that you can find the profile when the user logs into Sharepoint as corp\user1. If we didn't do the reconciliation, the profile would be identified by "resource\user1" and the user would be logged in as "corp\user1" and never the two shall meet.

In order to do this, we follow the DN to the master account by looking at the ms-ds-Source-Object-DN** attribute in the User object. When you setup the Directory Connection in Office Server, you will be asked for the login and password for the account that has access to the login forest.

In the Multi-login forest case:

For users who have a login account in each of the forests, we need to correctly map one login user to the other. This is easily done with the msdsSourceObjectDN attribute I mentioned earlier. However, we need to verify the user experience for each account and see whether the "right" thing has happened.

A couple of definitions for the examples to make sense:
1. There are two accounts domain1\user and domain2\user
2. They are in different forests that trust each other
3. Domain1\user is the "master" account of Domain2\user (relationship encoded in AD attribute, populated via MIIS)

Existing features and their expected behaviour:

1. Profile page and object model
            Maintain the list of alternate accounts by which the profile is identified. When you try to find the profile of the user using either account, return the same profile (the one of the master account).

2. MySite
            Regardless of which account you are logged-in as, creating a MySite will create one using the master account (http://server/personal/user or http://server/personal/domain1_user), but will add the alternate login account(s) as administrators to the site.

3. People Search
            Search for people of either accountname (domain1\user or domain2\user) will return the same result, of domain1\user

 4. Audiences
            Audiences will only contain master accounts. So, during compilation, any rule that contained a slave account will get internally treated like it's master account. For example, All people reporting under "domain2\user" will get treated like "domain1\user". Since we reconcile all accounts, the management hierarchy will be exactly the same for both accounts.

5. Import from Business Data Catalog
            Since we are depending on the fact that there is a master account, we will only import data into the profile store that can be identified by the master account. For example, imagine there is an HR people table or webservice. When we try to import the employee id via the BDC, the record for that employee needs to be identified by "domain1\user" not by "domain2\user".  

6a. WSS Sync - Memberships
            We would have to treat sites in which domain1\user is a member of as well as sites in which domain2\user is a member of as though they belong to the same user, of domain1\user. That will generate the right list of sites. That's not enough.

In order to get the right roll-up of documents and tasks, we would need to issue a query that is something is the equivalent of "SELECT docs FROM member site WHERE author = domain1\user OR author = domain2\user"

6b. WSS Sync - Profile properties
            We will need to update the user table rows in the WSS site collection for both domain1\user and domain2\user. This will have the desired effect where the user goes to his MySite and uploads his picture. This info will then be sync'd to every WSS site regardless of whether the user logins in as domain1\user or domain2\user.

So that's it. Let me know if you think I have made incorrect assumptions or haven't covered some scenario. We are still working on this so your input will very timely and valuable.

Venky Veeraraghavan - Program Manager

** This attribute was an out-of-band schema release for Win2K3 server and is present in Win2K3 R2 and Vista server by default in the Contact and User objects.

Published Wednesday, March 15, 2006 10:41 PM by sptblog

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Support for Cross-forest deployments

This may be slightly off-topic, but we recently just installed another WSS server into our existing set of servers.  We run WSS in AD integrated mode and per the original docs, designate an OU called WSS_ou.

Can we change the ou without re-installing?  It would be convenient to see the users created for all sites on this particular server to be grouped in a different ou but we don't want to make a change "underneath" WSS that might cause havoc.
Thursday, March 16, 2006 1:32 PM by Robert Spivack

# Alive and kickin' in Seattle

Sunday, March 19, 2006 11:20 PM by blog.ekegren

# Tech Talk PT » Blog Archive » Support for Cross-forest deployments

# re: Support for Cross-forest deployments

Does the people picker in SPS 2003 support crossing domains within the same forest?  We've got an SPS instance where we can only select from the domain that the server is on.  I'm wondering if this is a built-in limitation or a misconfiguration.
Tuesday, March 28, 2006 11:56 AM by Bill B

# re: Support for Cross-forest deployments

Hi,

There is a reference to  Beta2 in the article. Does this mean SPS 2003 Beta 2 or SPS 2007 Beta2. The time frame at whih this article is posted (Wednesday, March 15, 2006 10:41 PM ) is bit confusing. If you can please clarify it will be really helpful.

Thanks,
Thomas
Thursday, April 06, 2006 4:59 PM by Thomas Mathew

# re: Support for Cross-forest deployments

Thomas, what do you think? Beta 2 of SPS 2003 was out 3 years ago... Not eally a hot topic to write about when SP2 is out already;-)
Friday, April 21, 2006 4:33 PM by Serge van den Oever [Macaw]

# re: Support for Cross-forest deployments

Nice, We have a team at Microsoft that take use of the ms-ds-Source-Object-DN attribute. I'm a bit dissapointed that this attribute ended up singel valued
Saturday, May 13, 2006 11:10 AM by chriss3

# re: Support for Cross-forest deployments

Hi, I'm trying to set the property for the people picker:

stsadm.exe -o setproperty -url http://server:port -pn "peoplepicker-searchadforests" -pv "forest:foo.corp.com;domain:bar.foo.corp.com", LoginName, P@ssword

But I get an error: Cannot retrieve the information for application credential key.

Is this a rights problem or do I have to set the application credential key anywhere?

I searched in the registry and found a key there, CredentialKey, and the rights there seamed fine.

/H

Monday, January 08, 2007 12:01 PM by Henrik

# Multi Forest/Cross Forest People Picker peoplepicker-searchadcustomquery

stsadm -help setproperty Here's a list of the people picker properties that can be set () peoplepicker-activedirectorysearchtimeout

Thursday, January 18, 2007 11:02 AM by Joel Oleson's SharePoint Land

# re: Support for Cross-forest deployments

Change the syntax to:

stsadm.exe -o setproperty -propertyname peoplepicker-searchadforests -propertyvalue domain:bar.foo.corp.com

You can have either a forest or domain value, but not both.  To confirm the settings after running the STSADM operation run:

stsadm.exe -o getproperty -propertyname peoplepicker-searchadforests -propertyvalue domain:bar.foo.corp.com

Wednesday, January 31, 2007 11:04 PM by Bill Baer

# re: Support for Cross-forest deployments

This doesn't work for Sharepoint Portal Server 2003 does it?? I'm not able to make it work. Is there an updated stsadm.exe that I can import into my existing Sharepoint directory that won't 'blow up' the current deployment??

Friday, February 02, 2007 7:11 PM by chringram

# People Picker and Multiple Forests

Great article for enabling the people picker in multiple forests. http://blogs.msdn.com/sharepoint/archive/2006/03/15/552331.asp

Thursday, February 08, 2007 6:32 PM by Johnwe's SharePoint WebLog

# " + title + "

Friday, February 16, 2007 4:30 PM by " + title + "

# re: Support for Cross-forest deployments

I get the "Cannot retrieve the information for application credential key", i tried the other format i think it could be the way i'm putting the login and pwd for the domain, because it doesn't work with the format -pv "forest:foo.corp.com;domain:bar.foo.corp.com", LoginName, P@ssword

it didn't worked with only forest or only domain.

Monday, February 19, 2007 4:39 PM by Pedro Pablo

# Resource forest sharepoint user provisioning iifp

For a Exchange/Sharepoint resource forest that trusts 1 or 2 different forests is the People and Personalization features the best scenario?

<the ideia is group together by membership people of different companies together to work on exchange/sharepoint>

On user provisioning with iifp what must be done?

Saturday, March 24, 2007 8:04 PM by mendrigueira

# re: Support for Cross-forest deployments

This took a bit of wrench turning, but we were able to get this working successfully on RTM MOSS 2007.  First, the sample STSADM command has a typo.  Should read as follows (note the moved quotation mark):

stsadm.exe -o setproperty -url http://server:port -pn "peoplepicker-searchadforests" -pv "forest:foo.corp.com,LoginName,P@ssword;domain:bar.foo.corp.com,LoginName2,P@ssword2"

Also, there are no explicit steps here for the directory connection, although it is in the diagrams.  You will need to set one up for the remote domain, or change the default connection to the remote domain as your case requires.

Wednesday, March 28, 2007 12:31 PM by Mark Bessett

# re: Support for Cross-forest deployments

Has anyone been able to get this to work with the Central Administration site? I have it working fine on all my other web applications but cannot get it working on the Central Administration site. Any help would be appreciated.

Tuesday, April 17, 2007 4:24 PM by Kenneth Kolstad

# re: Support for Cross-forest deployments

I have an issue using peoplepicker in a one way External trust envir.

When I search for a remote user from the WSS site I receive 2 Security event errors.

It seams that the user validation is using the machine account xxx$... instead of account in STSADM.

I installed the WSS on a Domain Controller, run the correct stsadm command line and it works.

In the Security event I can see that it is using the account specified on stsadm command line to connected the trusted domain. Any idea?

Friday, June 22, 2007 6:16 PM by fmidili

# computer distance learning degree uk

computer distance learning degree uk

Saturday, September 15, 2007 11:52 AM by computer distance learning degree uk

# free myspace music video codes fort minor

free myspace music video codes fort minor

Wednesday, September 26, 2007 12:38 AM by free myspace music video codes fort minor

# re: Support Media Player Cross Browser coding

Can anyone provide cross browser coding for Media player? On my site Media Player does not play on some browsers just Explorer

Friday, January 11, 2008 9:22 AM by Christian

# re: Support for Cross-forest deployments

Couldn't get multiple forests to work. All servers running 2003 R2 SP2.  Config is DOMAIN1 and DOMAIN2 in separate forests.  DOMAIN1 trusts DOMAIN2 (one way).  Added peoplepicker on Sharepoint for MySites in DOMAIN1 to point to DOMAIN2. Tried changing the MSDS-sourceobjectdn to multple values "CN=<name>, CN=Users, DN=DOMAIN1, DN=COM" and "DOMAIN1\username" - neither are working.  Is my syntax incorrect?  MySIte keeps trying to create a second profile with same username but diff domain, which fails since usernames the same.

Monday, January 21, 2008 10:54 AM by Kevin Johnston

# SharePoint 2007 How To List &laquo; SharePoint Sherpa

Tuesday, February 12, 2008 8:30 PM by SharePoint 2007 How To List « SharePoint Sherpa

# re: Support for Cross-forest deployments

I have two forest with trust relationship.

One forest have all WSS and SPS2k3 portals.

I have addedd other forests users to my WSS site as domain\domain users and gave them Reader access, they can easily access.

However when i am doing the same thing for SPS2k3 it is not working. Is there any specific requirement for SPS2k3.

I had gone through above article but however didnt able to break the ice.

Any help most welcome.

Regards,

Brajesh

Monday, February 25, 2008 10:01 AM by Brajesh

# Custom SharePoint People Picker &laquo; PANVEGAs Blog

Wednesday, September 24, 2008 3:07 PM by Custom SharePoint People Picker &laquo; PANVEGAs Blog

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker