Welcome to MSDN Blogs Sign in | Join | Help

Multi-tenancy in CRM 4

For this blog, I wanted to provide an overview of the multi-tenancy capabilities we added in CRM 4.0. Multi-tenancy refers to a single CRM server being able to support multiple organizations.

With CRM 4, you might have noticed that we create a new database called MSCRM_CONFIG. This is what we refer to as “Config DB” and contains information about the organizations (such as location of its database etc) in the deployment.

There are a couple of ways in which you can create multiple organizations. Note that the ability to create multiple organizations is not supported in all CRM SKUs.

Use Deployment manager to create a new organization (All Programs -> Microsoft CRM -> Deployment Manager). You need to be a member of Deployment Administrators group to run this tool. The user who installed CRM is added as a member of this group automatically. Deployment manager will collect information such as name of the organization, currency settings, sql server etc and create a new organization.

Programatically thru’ the CrmDeploymentService.asmx (http://<crmserver>/MSCRMServices/2007/CrmDeploymentService.asmx ).

The code snippet below assumes you have generated a proxy against the above web service.

First, create an instance of Organization class and specify properties of the organization you want to create.

Organization myOrg = new Organization();

myOrg.UniqueName = "TestOrg";

myOrg.FriendlyName = "Display Name for TestOrg";

myOrg.SqlServerName = "testsql"; // Replace this with the name of your sql server.

myOrg.SrsUrl = "http://localhost/ReportServer"; // Replace this with the name of your SRS Server URL.

myOrg.BaseCurrencyCode = "USD";

myOrg.BaseCurrencyName = "US Dollar";

myOrg.BaseCurrencySymbol = "$";

Next, create an instance of the CrmDeploymentService proxy and execute the CreateRequest on it. Provisioning a new organization can take some time, so be sure to override the default timeout to a reasonably high value.

CrmDeploymentService deploymentService = new CrmDeploymentService();

deploymentService.Timeout = 10 * 60 * 1000; // 10 minutes.

CreateRequest request = new CreateRequest();

request.Entity = myOrg;

CreateResponse response = (CreateResponse)deploymentService.Execute(request);

There are some additional considerations to keep in mind when the crm deployment service is installed. In particular, the deployment service role should be installed as a domain account. For this reason, it is recommended that you dedicate a separate server to run the deployment service. We should have more detailed documentation going Live shortly on installing the deployment service and I’ll update this article with links to the documentation when they are available.

Switching between multiple organizations: If you are a member of multiple organizations, you can indicate which organization you want to access in the URL as follows: http://<mycrmserver>/<orgname> -- For example, http://localhost/foo would indicate you want to access the organization named foo.

The CRM Live offering provides organization-specific URLs to access an organization (https://foo.crm.dynamics.com for example).

Jagan Peri

Published Friday, January 18, 2008 7:41 AM by crmblog

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

# Multi&#45;tenancy in CRM 4

There is an interesting post over at blogs.msdn.com

Friday, January 18, 2008 12:00 PM by Windows Vista News

# re: Multi-tenancy in CRM 4

May I know what version of CRM 4.0 is capable of Multi tenancy? When we try to create new organization in our CRM 4.0, it gives the following message:

"To create a new organization, the wizard must remove the current organization company name. After the wizard completes you will no longer have access to this organization. Are you sure you want to continue?"

Tuesday, January 22, 2008 1:13 AM by Jebb

# re: Multi-tenancy in CRM 4

From the deployment SDK documentation:

"Note   Microsoft Dynamics CRM 4.0 Workgroup Edition and Professional Edition do not include support for multiple customer organizations."

The deployment SDK is available for download at:

http://blogs.msdn.com/crm/archive/2008/01/22/crm-4-0-deployment-sdk-is-now-available.aspx )

Tuesday, January 22, 2008 11:56 PM by Jagan Peri

# re: Multi-tenancy in CRM 4

Jagan,

How do you know at runtime which organization is being used at the moment (in the current context)? Parsing the url won't work always because you might be in a virt dir with a custom page. Is there anyway to query the user's principal or identity?

Thanks,

Federico.

Friday, February 08, 2008 9:49 AM by Federico

# re: Multi-tenancy in CRM 4

My question about this new capability of CRM 4, is if you will lose our not the possibility of a general view of the conpanies. For exemple it´s possible with multy-tenancy to have a overall view of all company´s oportunities ?

Thanks

Monday, February 11, 2008 8:03 AM by Benjamin

# Overview of Several Organization in CRM 4

Hello

Using multi-tenancy capability it´s possible to create several organization in the same server. In a second stage it´s possible to integrate the several organization so that the top management has a complete picture of the group of company´s ?

Thanks

Benjamin

Monday, February 11, 2008 9:53 AM by Benjamin

# re: Multi-tenancy in CRM 4/Overview of Several Organization in CRM 4

Hi Benjamin,

  You bring up a good question. CRM 4.0 doesnt offer any capabilities to integrate/present data across multiple organizations...

 Depending on your requirements, you might want to consider using Business Units within an organization to model your usage rather than use multiple organizations...

thanks

Jagan

Tuesday, February 12, 2008 12:44 AM by Jagan Peri

# re: Multi-tenancy in CRM 4/Is there anyway to query the user's principal or identity?

Hi Federico,

You might want to look at the following msdn article for more info:

http://msdn2.microsoft.com/en-us/library/cc151050.aspx

In some cases, we do parse the URLs to map the incoming request to an org. For the case you are talking about, your code needs to create an auth token before making SDK calls as shown in the above MSDN article.

thanks

Jagan

Tuesday, February 12, 2008 12:57 AM by Jagan Peri

# re: Multi-tenancy in CRM 4

Hi Jagam

I find this news about CRM 4 in yahoo website:  

"Microsoft added multitenant capabilities with version 4.0 of the product, which means a single instance of the software on a server can serve multiple customers when the suite is running as a hosted service. The company also added more support for global companies, giving customers a single view for managing accounts worldwide and adding support for multiple currencies."

http://news.yahoo.com/s/pcworld/20080131/tc_pcworld/142056

However i have been told that you can you can setup the users for multiple organization access view.

Can you help me to analise this information?

Wednesday, February 13, 2008 5:19 AM by Benjamin

# re: Multi-tenancy in CRM 4

when i try to create a new organization in mscrm 4.0 through deployment manager, after completing all the wizards finally i am getting an error "crmexception:configure organization utility cannot run on a domain controller machine"

Friday, February 15, 2008 1:46 AM by prabhu

# Programmatically creating a new organization in CRM4

For those nerds like me that are interested in developing your own Microsoft Dynamics CRM 4.0 MPS Provider

Tuesday, February 19, 2008 9:31 AM by Cameron McFie

# re: Multi-tenancy in CRM 4

The CRM 4 deployment document mention that the following command can be executed to "Preventing CRM Users from Adding (Disabling the Create User Feature)"

Microsoft.Crm.DeploymentConfigTool OrgFeatureSettings -Organization:AdventureWorks -CreateUser:false

Is it possible to update the organization feature settings to disable the user creation process via the API?

Tuesday, March 04, 2008 11:02 PM by Toiletduck

# re: Multi-tenancy in CRM 4

I wrote an article on importing and deleting organizations on my blog at:

http://eccosystem.blogspot.com/2008/04/install-and-delete-ms-crm-organization.html

Sunday, April 13, 2008 11:34 AM by Nelson

# re: crmService for multitenancy

I have created ,two organization and made some customization in second organization's(added custom attributes for account).

Lets say Org1 while intalation,Org2 added later .Now working with Org2.

In a custom website for the second organization,i am using the CRMService reference,but iam unable to work with the custom attributes of account.

How to go about this?

Friday, August 01, 2008 2:48 AM by Gangadhar

# Create Multi-Tenancy Organizations in CRM 4.0

After some basic checking of CRM 4.0 system, it’s now time to import some sample data and test further.

Friday, August 29, 2008 11:45 AM by Rexiology@MSDN

# Create Multi-Tenancy Organizations in CRM 4.0

crosspost from http://blogs.msdn.com/rextang After some basic checking of CRM 4.0 system, it’s now time

Friday, August 29, 2008 11:46 AM by Rexiology::Work

# re: Multi-tenancy in CRM 4

Hey Great post thanks.  Question....The logo at the top left of the screen in CRM.  Can it be customized to be the logo of each unique Organization?

Tuesday, November 04, 2008 7:53 PM by Robert

# re: Multi-tenancy in CRM 4

Robert,

You can replace the logo on the header of the CRM screen by replacing two image files on the CRM application server.  The files are under the _imgs folder and are named mast_back.gif and hasthead.jpg.  This is not a supported customization and may violate the license agreement (consult your attorney...).  These files may get replaced with the Microsoft version if you do a CRM upgrade or apply a hotfix.

For anyone interested, I posted an article "A Primer on Multitenancy for Microsoft Dynamics CRM"  at http://thecrmarchitect.wordpress.com/2009/01/05/a-primer-on-multi-tenanancy-for-microsoft-dynamics-crm/

Tuesday, January 06, 2009 4:01 PM by Dan Blake

# re: Multi-tenancy in CRM 4

Oops...make that "masthead.jpg" in the comment above.

Tuesday, January 06, 2009 4:21 PM by Dan Blake

# re: Multi-tenancy in CRM 4

I have created ,two organization and made some customization in second organization's(added custom attributes for account).

Lets say Org1 while intalation,Org2 added later .Now working with Org2.

In a custom website for the second organization,i am using the CRMService reference,but iam unable to work with the custom attributes of account.

How to go about this?

can someone please reply on above point.

Wednesday, February 11, 2009 11:24 PM by Piyush

# re: Multi-tenancy in CRM 4

Hi piyush , did you publish changes in crm, and actualize web references in visual studio project?.

Wednesday, April 22, 2009 10:36 AM by David Martinez Fresneda

# re: Multi-tenancy in CRM 4

Is it possible to set different logo jpg's for different organizations in a multi-org config?

Tuesday, May 05, 2009 2:51 PM by Glen

# re: Multi-tenancy in CRM 4

Great Post. Thanks

Monday, November 16, 2009 3:40 AM by soujanno

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker