{"id":218,"date":"2009-03-05T10:52:00","date_gmt":"2009-03-05T05:22:00","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=218"},"modified":"2009-03-05T10:52:00","modified_gmt":"2009-03-05T05:22:00","slug":"how-to-login-to-various-crm-deployments","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/","title":{"rendered":"How to Login to various CRM deployments"},"content":{"rendered":"<p>CRM supports various Deployment methods and unfortunately for the developers the method to connect to each of these differs. So here are the login functions for each of the Deployment methods supported by Dynamics CRM.<br \/>\n<strong><span style=\"text-decoration: underline;\">On Premise CRM connection:<\/span><\/strong><br \/>\nOn premise uses AD for authentication.<br \/>\nCrmService service = new CrmService();<br \/>\nservice.Url = &#8220;http:\/\/&#8221; + servername + &#8220;\/mscrmservices\/2007\/crmservice.asmx&#8221;;<br \/>\nservice.CrmAuthenticationTokenValue.OrganizationName = &#8220;orgname&#8221;;<br \/>\nservice.CrmAuthenticationTokenValue.AuthenticationType = 0;<br \/>\nservice.Credentials = new System.Net.NetworkCredential(&#8220;username&#8221;, &#8220;Password&#8221;, &#8220;DomainName&#8221;);<br \/>\nOR<br \/>\ncrmService.Credentials = System.Net.CredentialCache.DefaultCredentials;<br \/>\n<strong><span style=\"text-decoration: underline;\">Live CRM connection: <\/span><\/strong><br \/>\nCRM Live uses Passport authentication. It requires a reference to the Idcrlwrapper be added. The Idcrlwrapper is available along with the SDK as helper files.<br \/>\nMake sure you have copied the msidcrl40.dll to the system32 folder before you try to run this code.<br \/>\nCrmDiscoveryService discoveryService = new CrmDiscoveryService();<br \/>\ndiscoveryService.Url = &#8220;<a href=\"https:\/\/dev.crm.dynamics.com\/MSCRMServices\/2007\/Passport\/CrmDiscoveryService.asmx\">https:\/\/dev.crm.dynamics.com\/MSCRMServices\/2007\/Passport\/CrmDiscoveryService.asmx<\/a>&#8220;;<br \/>\nRetrievePolicyRequest policyRequest = new RetrievePolicyRequest();<br \/>\nRetrievePolicyResponse policyResponse = (RetrievePolicyResponse)discoveryService.Execute(policyRequest);<br \/>\n\/\/ Retrieve a Windows Live ticket from the Live<br \/>\nservice.LogonManager lm = new LogonManager();<br \/>\nstring passportTicket = lm.Logon(&#8220;LiveWindowsUserId&#8221;, &#8220;password&#8221;, &#8220;crm.dynamics.com&#8221;, policyResponse.Policy, &#8220;Production&#8221;);<br \/>\nRetrieveCrmTicketRequest crmTicketRequest = new RetrieveCrmTicketRequest();<br \/>\ncrmTicketRequest.OrganizationName = &#8220;OrganizationName&#8221;;<br \/>\ncrmTicketRequest.PassportTicket = passportTicket;<br \/>\nRetrieveCrmTicketResponse crmTicketResponse = (RetrieveCrmTicketResponse)discoveryService.Execute(crmTicketRequest);<br \/>\nCrmAuthenticationToken token = new CrmAuthenticationToken();<br \/>\ntoken.AuthenticationType = 1;<br \/>\ntoken.CrmTicket = crmTicketResponse.CrmTicket;<br \/>\ntoken.OrganizationName = crmTicketResponse.OrganizationDetail.OrganizationName;<br \/>\nNow, once you have the token assign it to the crmservice object as we do in on premise.<br \/>\n<strong><span style=\"text-decoration: underline;\">Hosted CRM connection:<\/span><\/strong><br \/>\nThis uses SPLA authentication. You need to use the userid and password provided to you by your hosting provider. You would also need to get the discovery URL from them.<br \/>\nFrom the discovery service URL you can retrieve the list of organizations.<br \/>\nRetrieveOrganizationsRequest orgRequest = new RetrieveOrganizationsRequest();<br \/>\norgRequest.UserId = username;<br \/>\norgRequest.Password = password;<br \/>\nRetrieveOrganizationsResponse orgResponse = (RetrieveOrganizationsResponse)disco.Execute(orgRequest);<br \/>\n\/\/Find the desired organization with which you want to connect.<br \/>\n\/\/Retrieve the ticket.<br \/>\nRetrieveCrmTicketRequest ticketRequest = new RetrieveCrmTicketRequest();<br \/>\nticketRequest.OrganizationName = organization;<br \/>\nticketRequest.UserId = username;<br \/>\nticketRequest.Password = password;<br \/>\nRetrieveCrmTicketResponse ticketResponse = (RetrieveCrmTicketResponse)disco.Execute(ticketRequest);<br \/>\n\/\/Create the CrmService Web service proxy.<br \/>\nCrmAuthenticationToken sdktoken = new CrmAuthenticationToken();<br \/>\nsdktoken.AuthenticationType = 2;<br \/>\nsdktoken.OrganizationName = organization;<br \/>\nsdktoken.CrmTicket = ticketResponse.CrmTicket;<br \/>\nNow, once you have the token assign it to the crmservice object as we do in on premise.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CRM supports various Deployment methods and unfortunately for the developers the method to connect to each of these differs. So here are the login functions for each of the Deployment methods supported by Dynamics CRM. On Premise CRM connection: On premise uses AD for authentication. CrmService service = new CrmService(); service.Url = &#8220;http:\/\/&#8221; + servername\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/\">Read More: How to Login to various CRM deployments &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[331,407,409,410,1007,1298],"class_list":["post-218","post","type-post","status-publish","format-standard","hentry","category-dynamics-crm","tag-connection","tag-crm-live","tag-crm-on-premise","tag-crm-online","tag-login","tag-partner-hosted"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"CRM supports various Deployment methods and unfortunately for the developers the method to connect to each of these differs. So here are the login functions for each of the Deployment methods supported by Dynamics CRM. On Premise CRM connection: On premise uses AD for authentication. CrmService service = new CrmService(); service.Url = &quot;http:\/\/&quot; + servername\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Tushar\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Microsoft Dynamics 365 CRM Tips and Tricks - By Inogic\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to Login to various CRM deployments - Microsoft Dynamics 365 CRM Tips and Tricks\" \/>\n\t\t<meta property=\"og:description\" content=\"CRM supports various Deployment methods and unfortunately for the developers the method to connect to each of these differs. So here are the login functions for each of the Deployment methods supported by Dynamics CRM. On Premise CRM connection: On premise uses AD for authentication. CrmService service = new CrmService(); service.Url = &quot;http:\/\/&quot; + servername\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2009-03-05T05:22:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2009-03-05T05:22:00+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inogicindia\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@inogic\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to Login to various CRM deployments - Microsoft Dynamics 365 CRM Tips and Tricks\" \/>\n\t\t<meta name=\"twitter:description\" content=\"CRM supports various Deployment methods and unfortunately for the developers the method to connect to each of these differs. So here are the login functions for each of the Deployment methods supported by Dynamics CRM. On Premise CRM connection: On premise uses AD for authentication. CrmService service = new CrmService(); service.Url = &quot;http:\/\/&quot; + servername\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@inogic\" \/>\n\t\t<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t\t<meta name=\"twitter:data1\" content=\"Tushar\" \/>\n\t\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2009\\\/03\\\/how-to-login-to-various-crm-deployments\\\/#blogposting\",\"name\":\"How to Login to various CRM deployments - Microsoft Dynamics 365 CRM Tips and Tricks\",\"headline\":\"How to Login to various CRM deployments\",\"author\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/inogic-logo.png\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#articleImage\",\"width\":1000,\"height\":325,\"caption\":\"inogic logo\"},\"datePublished\":\"2009-03-05T10:52:00+05:30\",\"dateModified\":\"2009-03-05T10:52:00+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2009\\\/03\\\/how-to-login-to-various-crm-deployments\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2009\\\/03\\\/how-to-login-to-various-crm-deployments\\\/#webpage\"},\"articleSection\":\"Dynamics CRM, Connection, CRM Live, CRM On-premise, CRM Online, Login, Partner Hosted\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2009\\\/03\\\/how-to-login-to-various-crm-deployments\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.inogic.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-crm\\\/#listItem\",\"name\":\"Dynamics CRM\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-crm\\\/#listItem\",\"position\":2,\"name\":\"Dynamics CRM\",\"item\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-crm\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2009\\\/03\\\/how-to-login-to-various-crm-deployments\\\/#listItem\",\"name\":\"How to Login to various CRM deployments\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2009\\\/03\\\/how-to-login-to-various-crm-deployments\\\/#listItem\",\"position\":3,\"name\":\"How to Login to various CRM deployments\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/dynamics-crm\\\/#listItem\",\"name\":\"Dynamics CRM\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\",\"name\":\"Microsoft Dynamics 365 CRM Tips and Tricks\",\"description\":\"By Inogic\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/inogic-logo.png\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2009\\\/03\\\/how-to-login-to-various-crm-deployments\\\/#organizationLogo\",\"width\":1000,\"height\":325,\"caption\":\"inogic logo\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2009\\\/03\\\/how-to-login-to-various-crm-deployments\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/inogicindia\",\"https:\\\/\\\/twitter.com\\\/inogic\",\"https:\\\/\\\/www.instagram.com\\\/inogicindia\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCM4V7ousgLSu1hbOEv4DUuQ\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/inogicindia\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/\",\"name\":\"Tushar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2009\\\/03\\\/how-to-login-to-various-crm-deployments\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/839d9ae7d2b941d2d09e91df322267a429821f2ce5494302b53bd5ca3679f1a0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Tushar\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2009\\\/03\\\/how-to-login-to-various-crm-deployments\\\/#webpage\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2009\\\/03\\\/how-to-login-to-various-crm-deployments\\\/\",\"name\":\"How to Login to various CRM deployments - Microsoft Dynamics 365 CRM Tips and Tricks\",\"description\":\"CRM supports various Deployment methods and unfortunately for the developers the method to connect to each of these differs. So here are the login functions for each of the Deployment methods supported by Dynamics CRM. On Premise CRM connection: On premise uses AD for authentication. CrmService service = new CrmService(); service.Url = \\\"http:\\\/\\\/\\\" + servername\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2009\\\/03\\\/how-to-login-to-various-crm-deployments\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"datePublished\":\"2009-03-05T10:52:00+05:30\",\"dateModified\":\"2009-03-05T10:52:00+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/\",\"name\":\"Microsoft Dynamics 365 CRM Tips and Tricks\",\"alternateName\":\"Inogic\",\"description\":\"By Inogic\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to Login to various CRM deployments - Microsoft Dynamics 365 CRM Tips and Tricks","description":"CRM supports various Deployment methods and unfortunately for the developers the method to connect to each of these differs. So here are the login functions for each of the Deployment methods supported by Dynamics CRM. On Premise CRM connection: On premise uses AD for authentication. CrmService service = new CrmService(); service.Url = \"http:\/\/\" + servername","canonical_url":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/#blogposting","name":"How to Login to various CRM deployments - Microsoft Dynamics 365 CRM Tips and Tricks","headline":"How to Login to various CRM deployments","author":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"publisher":{"@id":"https:\/\/www.inogic.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/inogic-logo.png","@id":"https:\/\/www.inogic.com\/blog\/#articleImage","width":1000,"height":325,"caption":"inogic logo"},"datePublished":"2009-03-05T10:52:00+05:30","dateModified":"2009-03-05T10:52:00+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/#webpage"},"isPartOf":{"@id":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/#webpage"},"articleSection":"Dynamics CRM, Connection, CRM Live, CRM On-premise, CRM Online, Login, Partner Hosted"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.inogic.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/#listItem","name":"Dynamics CRM"}},{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/#listItem","position":2,"name":"Dynamics CRM","item":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/#listItem","name":"How to Login to various CRM deployments"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/#listItem","position":3,"name":"How to Login to various CRM deployments","previousItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/#listItem","name":"Dynamics CRM"}}]},{"@type":"Organization","@id":"https:\/\/www.inogic.com\/blog\/#organization","name":"Microsoft Dynamics 365 CRM Tips and Tricks","description":"By Inogic","url":"https:\/\/www.inogic.com\/blog\/","logo":{"@type":"ImageObject","url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/inogic-logo.png","@id":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/#organizationLogo","width":1000,"height":325,"caption":"inogic logo"},"image":{"@id":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/#organizationLogo"},"sameAs":["https:\/\/www.facebook.com\/inogicindia","https:\/\/twitter.com\/inogic","https:\/\/www.instagram.com\/inogicindia\/","https:\/\/www.youtube.com\/channel\/UCM4V7ousgLSu1hbOEv4DUuQ","https:\/\/www.linkedin.com\/company\/inogicindia"]},{"@type":"Person","@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author","url":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/","name":"Tushar","image":{"@type":"ImageObject","@id":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/839d9ae7d2b941d2d09e91df322267a429821f2ce5494302b53bd5ca3679f1a0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Tushar"}},{"@type":"WebPage","@id":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/#webpage","url":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/","name":"How to Login to various CRM deployments - Microsoft Dynamics 365 CRM Tips and Tricks","description":"CRM supports various Deployment methods and unfortunately for the developers the method to connect to each of these differs. So here are the login functions for each of the Deployment methods supported by Dynamics CRM. On Premise CRM connection: On premise uses AD for authentication. CrmService service = new CrmService(); service.Url = \"http:\/\/\" + servername","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.inogic.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/#breadcrumblist"},"author":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"creator":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"datePublished":"2009-03-05T10:52:00+05:30","dateModified":"2009-03-05T10:52:00+05:30"},{"@type":"WebSite","@id":"https:\/\/www.inogic.com\/blog\/#website","url":"https:\/\/www.inogic.com\/blog\/","name":"Microsoft Dynamics 365 CRM Tips and Tricks","alternateName":"Inogic","description":"By Inogic","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.inogic.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Microsoft Dynamics 365 CRM Tips and Tricks - By Inogic","og:type":"article","og:title":"How to Login to various CRM deployments - Microsoft Dynamics 365 CRM Tips and Tricks","og:description":"CRM supports various Deployment methods and unfortunately for the developers the method to connect to each of these differs. So here are the login functions for each of the Deployment methods supported by Dynamics CRM. On Premise CRM connection: On premise uses AD for authentication. CrmService service = new CrmService(); service.Url = &quot;http:\/\/&quot; + servername","og:url":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/","article:published_time":"2009-03-05T05:22:00+00:00","article:modified_time":"2009-03-05T05:22:00+00:00","article:publisher":"https:\/\/www.facebook.com\/inogicindia","twitter:card":"summary_large_image","twitter:site":"@inogic","twitter:title":"How to Login to various CRM deployments - Microsoft Dynamics 365 CRM Tips and Tricks","twitter:description":"CRM supports various Deployment methods and unfortunately for the developers the method to connect to each of these differs. So here are the login functions for each of the Deployment methods supported by Dynamics CRM. On Premise CRM connection: On premise uses AD for authentication. CrmService service = new CrmService(); service.Url = &quot;http:\/\/&quot; + servername","twitter:creator":"@inogic","twitter:label1":"Written by","twitter:data1":"Tushar","twitter:label2":"Est. reading time","twitter:data2":"2 minutes"},"aioseo_meta_data":{"post_id":"218","title":"","description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-02-02 05:50:52","updated":"2025-07-03 21:05:22","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.inogic.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/\" title=\"Dynamics CRM\">Dynamics CRM<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to Login to various CRM deployments\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.inogic.com\/blog"},{"label":"Dynamics CRM","link":"https:\/\/www.inogic.com\/blog\/category\/dynamics-crm\/"},{"label":"How to Login to various CRM deployments","link":"https:\/\/www.inogic.com\/blog\/2009\/03\/how-to-login-to-various-crm-deployments\/"}],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=218"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/218\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}