MSCRM online authentication

         try
        {
            ClientCredentials cre = new ClientCredentials();
            cre.UserName.UserName = "your user name";
            cre.UserName.Password = "your passwod";
            Uri serviceUri = new Uri("your Organizationservice.svc");

            OrganizationServiceProxy proxy = new OrganizationServiceProxy(serviceUri, null, cre, null);
            proxy.EnableProxyTypes();

            IOrganizationService _service = (IOrganizationService)proxy;
           
        }
        catch (System.Web.Services.Protocols.SoapException ex)
        {

           
        }

Comments

Popular posts from this blog

Connecting Dynamics 365 Web api using external HTML page

Get azure blob files inside Sub Directories

Interview questions on MS CRM