Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Implement Single Sign-on from an ASPX Webpage or IFRAME

[Applies to: Microsoft Dynamics CRM 2011]

This topic describes how to develop a custom webpage that can make SDK calls to Microsoft Dynamics CRM 2011 on behalf of the logged-on Microsoft Dynamics CRM user. The typical use of this capability is to write a webpage that is displayed in an IFRAME of the Microsoft Dynamics CRM user interface. That webpage performs its intended operation, for example, providing a store front, while being hosted on a website independent of the site hosting Microsoft Dynamics CRM. However, the webpage can perform its operations on behalf of the logged-on Microsoft Dynamics CRM user. The result is seamless integration between a webpage and Microsoft Dynamics CRM.

TipTip
When hosting webpages within the web application, Microsoft Dynamics CRM 2011 is backward compatible with Microsoft Dynamics CRM 4.0. You can continue to use your existing Microsoft Dynamics CRM 4.0 web pages or develop new ones that access the 2007 endpoint. However, this feature is deprecated and will be removed in a future version of Microsoft Dynamics CRM. For more information, see Use the Microsoft Dynamics CRM 4.0 (2007) Endpoint or consult the Microsoft Dynamics CRM 4.0 SDK.

An alternate solution is to use web resources. For a Model-View-Controller (MVC) programming paradigm, you can use web resources for the view, a plug-in as the controller, and an entity as part of your data model.

Microsoft Dynamics CRM 2011 with a Separate Website

This scenario is for a Microsoft Dynamics CRM 2011 IFD deployment where a separate website hosts a custom ASPX webpage that is (optionally) displayed in an IFRAME of the Microsoft Dynamics CRM web application. This scenario uses federated claims. Therefore, you will have to set up a security token service (STS) server for identity management. You will also need a certificate to be used when making Microsoft Dynamics CRM and the website-relying parties, which established cross-domain trust between these parties.

Background Information

For more information about how to configure claims and a relying party, see the following Microsoft Dynamics CRM 2011 Implementation Guide topics:

For more information about identity management, see http://channel9.msdn.com/Learn/Courses/IdentityTrainingCourse

Sample Code and Walkthrough

Sample code that implements this scenario is provided in the SampleCode\CS\GeneralProgramming\Authentication\IFDSingleSignOn folder of the SDK download. For a step-by-step guide to configuring and running the sample, see the topic Walkthrough: Single Sign-on from a Custom Web Page.

Microsoft Dynamics CRM Online with a Windows Azure Hosted Webpage

This scenario is for use with Microsoft Dynamics CRM Online where Windows Azure hosts a custom webpage that is optionally displayed in an IFRAME of the Microsoft Dynamics CRM web application. This scenario uses federated claims, provided by the Windows Live security token service (STS) server for identity management. You must provide a certificate to be used when making Microsoft Dynamics CRM Online and the Windows Azure website-relying parties, which established cross-domain trust between these parties.

Background Information

For more information about how to configure a relying party, see the following topic: Secure Windows Azure Web Role ASP.NET Web Application Using Access Control Service v2.0

For more information about identity management, see http://channel9.msdn.com/Learn/Courses/IdentityTrainingCourse

For more information about implementing this scenario including problems you may run into and the workarounds, see these blogs: CRM Online & Windows Azure: Improving the SSO experience, and CRM Online & Windows Azure Series.

Enable IFRAME Communication Across Domains

If you want to enable communication for an IFRAME that contains content from a different domain, you can use the Window.postMessage method. This browser method can be used for Internet Explorer 8. Google Chrome, Mozilla Firefox, and Apple Safari also support this method. For more information about using postMessage, see the following blog posts:

See Also

Microsoft Dynamics CRM 2011
Send comments about this topic to Microsoft.
© 2013 Microsoft Corporation. All rights reserved.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.