Posts

Showing posts with the label Credentials and Tokens in Microsoft CRM 2011

Credentials,tokens sample in Microsoft CRM 2011 from SDK by Late Bind Approach with IFDS deployment

Hi, First of all, Download Microsoft CRM 2011 SDK from Microsoft Web Site.Please ask google for exact URLs. do not forget adding Microsoft.xrm.sdk library from SDKs. IServiceManagement orgServiceManagement = ServiceConfigurationFactory.CreateManagement ( new Uri("http(s)://crm.???.com(:444)/organization_name/XRMServices/2011/Organization.svc")); Set the credentials. AuthenticationCredentials authCredentials = new AuthenticationCredentials(); authCredentials.ClientCredentials = new ClientCredentials(); authCredentials.ClientCredentials.UserName.UserName = "muhammet.atalay"; authCredentials.ClientCredentials.UserName.Password = "I Love CRM"; AuthenticationCredentials tokenCredentials = orgServiceManagement.Authenticate(authCredentials); Retrieve Token SecurityTokenResponse orgTokenResponse = null; if (tokenCredentials != null) ...