The Microsoft Dynamics CRM Blog
News and views from the Microsoft Dynamics CRM

Multi-tenancy in CRM 4

Multi-tenancy in CRM 4

  • Comments 23

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

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

  • 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?"

  • 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 )

  • 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.

  • 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

  • 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

  • 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

  • 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

  • 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?

  • 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"

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

  • 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?

  • 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

  • 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?

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

Page 1 of 2 (23 items) 12
Leave a Comment
  • Please add 5 and 2 and type the answer here:
  • Post