Wednesday 30 January 2013

CRM 2011 On Premise Customer Portal - Authentication by Active Directory

Hi all,

Since, last few days, I found out many people struggling with how to configure Customer Portal for CRM On Premise without using Window Live ID. So today, I am going to show you guys how to configure Customer Portal for CRM On Premise and using Active Directory authentication instead of using Window Live ID (which is for CRM Online).

Here is the step by step:

1. Download the Customer Portal for CRM 2011 - using AD from this blog:
http://community.adxstudio.com/blogs/shan/customer-portal-modifications/

That's is the Zip file of Customer Portal CRM 2011 (as you could download from pinpoint also). However, in this version, the blog author changed some codes and configuration values inside, which will help you to use the Active Directory authentication for the portal.

2. After unzip the folder, please navigate to the "Documentation" folder, open the "Customer Portal Deployment Guide_OnPremises_V2.0" file. Start from "Deployment Steps", you now follow the document from step 1 to step 3:
     - Step 1: Follow the document to import the solution into your CRM.

     - Step 2: You could skip this step. No need to do anything with it.

     - Step 3: Going your "SDK" folder (you should download SDK for CRM from Microsoft Source) --> Tools --> WebsiteCopy --> launch the "WebsiteCopy.exe" file. And follow step by step in the document.
      Note: in the end of the copy website process, the wizard will ask you to copy the "connectionString", you please copy it to somewhere.

So in the end of this stage, you have your Customer Portal in CRM as shown in below image !


3. In the "Customer Portal" folder (which you unzip at step 2), navigate to CustomerPortal --> Web --> Web.config file. Open the file, look at the "connectionStrings" part and especially the bold lines:

 <connectionStrings>
    <add name="Xrm" connectionString="ServiceUri=http://crm2011/Contoso; Domain=CONTOSO; Username=webportal;
Password=pass@word1"/>
    <add name="ADConnectionString" connectionString="
LDAP://contoso.com/CN=Users,DC=contoso,DC=com" />  
  <!--<add name="Live" connectionString="Application Id=0000000000000000; Secret=00000000000000000000000000000000"/>-->
    <!--<add name="Bus" connectionString="Service Namespace=???; Service Path=???; Issuer Name=???; Issuer Secret=???; Include Exception Detail In Faults=true"/>-->
  </connectionStrings>


Now, you need to change the connectionString (bold lines) into the correct: CRM URL (http://crmserver-name/domain-name), Domain, Username (of administrator, for example) and password. For the next line, do the same thing, change URL, Username, Domain (DC).

**Note: The username here should be the one has been created in AD, so later this AD account will be used to login the portal via AD Authentication.

4. In the same server, open IIS Manager (Internet Information Services):

- Navigating to "Sites" node, click right mouse to create a new website. Give approciate name for the website and put the physical path as the file in Customer Portal folder.

- After creating the website, right click on it in Application Tool tab, change the .NetFramework version to v4.030319.


  
- Finally, try to browse your website in IIS, now the portal will work and it connected to your CRM, using AD Authentication !


I hope the post is useful for you guys ;)