Dynamics crm crm ifd用户名和密码
我想知道在设置crmservice连接时如何获取用户名和密码并使用它Dynamics crm crm ifd用户名和密码,dynamics-crm,dynamics-crm-4,Dynamics Crm,Dynamics Crm 4,我想知道在设置crmservice连接时如何获取用户名和密码并使用它 CrmDiscoveryService disco = new CrmDiscoveryService(); disco.Url = "https://localhost/MSCRMServices/2007/SPLA/CrmDiscoveryService.asmx"; //Retrieve a list of available organizations from the CrmDiscoveryService Web
CrmDiscoveryService disco = new CrmDiscoveryService();
disco.Url = "https://localhost/MSCRMServices/2007/SPLA/CrmDiscoveryService.asmx";
//Retrieve a list of available organizations from the CrmDiscoveryService Web service.
RetrieveOrganizationsRequest orgRequest = new RetrieveOrganizationsRequest();
HERE I WANT TO PUT THE USERNAME AND PASSWORD FROM THE SIGNIN PAGE
// Substitute an appropriate domain, username, and password here.
orgRequest.UserId = domain + "\\" + username;
orgRequest.Password = password;
RetrieveOrganizationsResponse orgResponse = (RetrieveOrganizationsResponse)disco.Execute(orgRequest);
感谢帮助者:)我想你说的是IFD登录页面?您无法从该页面提取用户的凭据。如果您需要用户的凭据,则需要在自定义页面中将其拉入 您还可以使用UseDefaultCredentials属性完成orgrequest,该属性将使用当前用户的凭据:
CrmDiscoveryService disco = new CrmDiscoveryService();
disco.Url = "https://localhost/MSCRMServices/2007/SPLA/CrmDiscoveryService.asmx";
disco.UseDefaultCredentials = true;
或者,如果您在自定义页面上执行此操作,则可以使用。tnx对于答案,我将这样做