locked
CRM 2011 + IFRAME .aspx page authenitcation RRS feed

  • Question

  • Hi,

    I have shown .aspx page inside the Iframe of CRM. I have used the below authentication source code.

    I need to authenticate based on CRM logged in user. The below code authenticated Administrator access only.

     Uri OrganizationUri = null;
     Uri HomeRealmUri = null;
     ClientCredentials Credentials = null;
     IOrganizationService service = null;
     OrganizationServiceContext serviceContext = null;
     int globlaMonths;
     /// <summary>
     /// RevenueSchedule
     /// </summary>
     public RevenueSchedule()
     {
         Credentials = new ClientCredentials();
         Credentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
         OrganizationUri = new Uri(WebConfigurationManager.AppSettings["OrganizationUrl"]);

     }


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Yogesh Vijay Mulay

    Friday, July 11, 2014 12:40 PM

All replies

  • You can use AD impersonation like this, but you need the following:

    • CRM to be configured for AD authentication, and not Claims authentication
    • Windows Authentication to be enabled in the IIS website that hosts your ASP .Net application, and for users not to be allowed anonymous access to the ASP .Net page
    • Impersonation to be enabled in your web.config (<identity impersonate="true" />)
    • If the ASP .Net web site is deployed on a separate server from the server that hosts the CRM Organization web service, then you'll need to enable delegation in AD

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Friday, July 11, 2014 2:05 PM
    Moderator
  • Hi All,

    Waiting for a solution. Could you please help me on the same?


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Yogesh Vijay Mulay

    Monday, July 14, 2014 11:07 AM
  • If you are IFD-enabled, you will want to follow the approach in the links below. It does work, you just need to take your time and understand all the pieces.

    http://msdn.microsoft.com/en-us/library/gg509061(v=crm.5).aspx

    http://msdn.microsoft.com/en-us/library/gg509057(v=crm.5).aspx

    Tuesday, July 15, 2014 2:14 PM