Information Worker

...and beyond
Home
About Me
CodeSamples
Dynamics CRM
Women in Technology
DIWUG SharePoint eMagazine
Point to share?
Site Map
Integration with Dynamics
Do you have questions about CRM Dynamics from a technical or functional point of view? Don't hasitate to pop it right here.

 

 


 
* First name (required):

* Last name (required):
* E-mail address (required):

Phone number:
* Message (required):


 
Authentication issue: Using CRM WebParts in SharePoint

I attended TechEd Barcelona this year. And I was asked to take place on the "Ask the Expert" booth for Microsoft Dynamics. One of the questions was about connection failures to the CRM server when using the CRM WebPart in SharePoint.
 
So if you use the CRM WebParts in SharePoint and do you get authentication errors like "401: Unauthorized". This can be a helpfull article. The solution to this problem can be found in the Kerberos, Delegation and Server Principle Names (SPN). I'm no expert on these topics, but basically it's about the multiple server hops.
 
For example; the client is authorized on the SharePoint Server (hop 1). When rendering the webpart these credentials needs to be transfered to the CRM server (hop 2) and from the CRM server to the Database Server (hop 3) to get the proper information. All connections needs integrated security in order to filter views of data for the user.
 
solution:
The client and SharePoint Server needs to be a member of a trusted domain. The CRM website-url (in this case on the SharePoint Front-End server) must be part of the IE trusted sites. Make sure the IE is set to use Integrated security. This can be found in IE > tools > Internet options > advanced > look for security.
 
All servers needs to support Kerberos and are member of a trusted domain. The webservers must be trusted for delegation and the SPN's needs to be setup for each name that the client will access.
You can download the SetSPN.exe tool from the Microsoft site.
 
When you create a new SPN for you CRM web server, you need to determine the account that's used in the IIS application pool.
If you use a specific domain account the SPN statement should look like this:
setspn -a http/<name> <domain\username>
 
If you use a computer account (local system or Network Service) you can use this syntax
setSPN -a http/<name> <netbios name server>
 
You also need to check the SPN for the SQL service. Although it's created when you install SQL server there can be different reasons why it's not configured correctly.
You can check Principle Names using:
setSPN -I <computer>
 
If you need to set a new SPN for the SQL service, the syntax could be:
setspn -a mssqlsvc/<database.domain.local> <domain\username>
 
Hopes this helps! Drop me a line if you have more questions.... 

 
Tip: Using iFrames with CRM

If you use a iFrame with Microsoft CRM to load for example a SharePoint site, you can get an login box if the loaded page needs Windows Credentials. By default cross frame scripting is not allowed with CRM. But you can easily allow cross frame scripting by changing the iFrame properties by uncheck the restriction in the Security part on the General tab..
 
 
Query regarding sharepoint and CRM integration (2)

From: Nitin Gupta
Sent: 6/7/2007
Subject: RE: Query regarding sharepoint and CRM integration

Hi Marianne,

Thanks a ton for your response.
Actually, right now I don’t have a clear path on this integration because right now my short term goal is to explore more and more in how and what we can integrate with both the separate environments. As we know that MOSS has its own capabilities and CRM has its own so my business wants to know that what all possibilities are there in this kind of integration. I know there is one thing in our back of mind that we need to integrate workflow solution around the both environments. E.g. an order is generated by sales people in CRM then we can basically involve people from both the environment to take part in that workflow so that both the categories (CRM & NON CRM) can be benefited. This is all I can tell you about what going on in our mind regarding this context. The main problem at my end is that I have a very good experience in SharePoint but completely blank in terms of CMR so I need to do a lot of study regarding the object model and programming within CRM.
 
I would like to say you thanks again for showing such kind of helping behavior and would definitely ping you in future for any kind of help or knowledge sharing.
Thanks & Regards,

(Nitin K. Gupta)
 
answer
Hi Nitin,
Have you downloaded the SDK of CRM? I found the SDK very resourceful!
About workflow:

CRM 3.0 uses its own workflow engine. CRM 4.0 (Titan) the workflow will be based on the Windows Workflow Foundation. I think with CRM 4.0 you will be able to create a better integration with MOSS when using workflow.

But you can get very far using the workflow of CRM 3.0. You can trigger a workflow from CRM using code.This picture shows where you can customize CRM. (the orange balloons)

 


 
Query regarding sharepoint and CRM integration (1)

From: Nitin Gupta
Sent: 6/5/2007
Subject: Query regarding sharepoint and CRM integration

Hi Marianne,
I introduce myself as Nitin Gupta from India working on SharePoint projects from last 2 years. I read your article about SharePoint and CRM integration which you have posted on 27th February 2007 on Microsoft dynamics site; the same I have pasted below in my mail. I am also trying to integrate Microsoft CRM with MOSS 2007 but could not able to get any clear path to follow in scope and functionality perspective, so I thought to write you a personal mail so that you could provide me some more details on this article that how you have actually integrated these systems and it would be very great for me if you provide any kind of document related to this integration.
Thanks in advance,
Looking for a positive response from your side.
Thanks & Regards,

Nitin K. Gupta
Senior Consultant
 
answer
Hi Nitin,

Thank you for your email. I like to help you but need more information on how you want to integrate MOSS and CRM.

Could you tell me more about your business case? You can integrate MOSS into CRM or CRM into MOSS. How you want to do it also depends on licensing. Not everybody has a license for CRM but some CRM information can be useful for non-CRM-users.

There is a standard CRM web part you can use in you MOSS environment (List web part). You can also create your own web parts that show CRM data or create a form to fill CRM with data.

Below one way how you can integrate WSS 3.0 into CRM.



In my project we created a WSS site collection when an Account is created.

This site is can be viewed from CRM. You can do this by using the CRM workflow which calls an assembly. This assembly uses the self service site creation from WSS.

When the site is created the URL of the site is given back to CRM and used for the iFrame within the Account entity.
 
Just let me know what how I can help you. 
Kind regards,
Marianne

 
CRM Error: Server was unable to process request

From:      Henk Drent
Date:       6/12/2007
Subject:  CRM Error: Server was unable to process request
 
Hi
(translated) I try to create a opportunity using the Create method from CRM webservices. But I keep getting the following error message: Server was unable to process request.
 
Henk
 
Answer:
This error occures when some attributes are not valid. When you use the Create() method make sure you add all the manditory fields. When you add an Account or Contact as a Customer you must not forget to "tell" CRM what type of Customer you try to add. You can do this as follows:

Opportunity opp = new Opportunity();
opp.Name = "MyOpp";
opp.customerId.Value = {accountGUID};
opp.customerId.Type = EntityName.account.ToString();
 
MyCrmService.Create(opp);
 
You have to do the same thing when you want to assign the opportunity to a system user.