locked
On-premise + IFD authentication...what about authentication to Sharepoint? RRS feed

  • Question

  • Hi,

    I'm integrating SharePoint document libraries in a iframe, which is built in a custom web application. The CRM application will when I'm finished configuring support both on-premise and IFD authentication. For know I've concentrated on the on-premise side, and used "ServiceThatNeedCredentials.Credentials = CredentialCache.DefaultCredentials" for everything. This works like a charm, both for CRM and the Sharepoint part.

    But what happens when IFD users use my application? I've started out with some code in my Global.asax-file which retrieves the Guid of the current user. (Probably should add a boolean that i can check to determine if the user is an IFD user)
    if (request.LogonUserIdentity.IsAuthenticated == true)
                {
    
                    WhoAmIRequest userRequest = new WhoAmIRequest();
                    WhoAmIResponse user = (WhoAmIResponse)CrmServiceManager.GetCrmService().Execute(userRequest);
                    userGuid = user.UserId;
                    log.Debug(userGuid);
                }
                else //ifd
                {
                    try
                    {
                        userGuid = new Guid(Context.User.Identity.Name);
                    }
                    catch (Exception e)
                    {
                        log.Debug("Error Global.asax", e);
                    }
                }
    I'm sure I'll find enough code snippets around to get CRM authentication going. But what about authentication for SharePoint?? Can I use anything from CRM SDK or its authentication process to do it?? Is it even possible?

    Should mention that both CRM and Sharepoint are on the same server.
    Monday, May 18, 2009 10:11 PM

Answers

  • In CRM 4 I don't think there's any way to combine IFD authentication with SharePoint authentication, as they are completely separate. I don't think you've got any choice other than for the users to have to resupply their credentials to SharePoint when accessing the IFrame
    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Wednesday, November 24, 2010 8:54 AM
    Moderator

All replies

  • I used this authentication in a plug-in to authenticate to a Share Point server.

    public

     

    class UpdateAccountOnCreate : IPlugin

    {

     

    //const string SP_LIST_CREATED_ATTR = "new_splistcreated";

     

    //const string SharepointUrl = "http://bportal/sites/osgdev/_vti_bin/Lists.asmx";

     

    //const string DocumentLocation = "http://bportal/sites/osgdev/";

     

    const string SP_LIST_CREATED_ATTR = "new_splistcreated";

     

    const string spUsername = "crmadmin";

     

    const string spPassword = "Microsoftcrm5";

     

    const string spDomain = "ATL";

     

    const string serverName = "bportal";

    It's just an example.

     


    Curtis J Spanburgh
    Wednesday, November 3, 2010 2:55 PM
    Moderator
  • In CRM 4 I don't think there's any way to combine IFD authentication with SharePoint authentication, as they are completely separate. I don't think you've got any choice other than for the users to have to resupply their credentials to SharePoint when accessing the IFrame
    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.excitation.co.uk
    Wednesday, November 24, 2010 8:54 AM
    Moderator