web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

C# - Problem in connect to crm with password wich has a ";"

(0) ShareShare
ReportReport
Posted on by 55

Hello to all!
Can anyone help me?

Im trying to connect to CRM with following code:

Microsoft.Xrm.Client.CrmConnection connection = CrmConnection.Parse(connectionString);

service = new OrganizationService(connection); 

My connection string 

string connectionString = "Url=<myOrg>; Username=<myLogin>; Password=<MyPass>";

So, problem is - my password has a ';' symbol, so 

CrmConnection.Parse 
method can't to parse it right and throw an error.

How can I avoid this problem, or how I can connect to CRM with another method?

This method 

IOrganizationService _service = null;
                OrganizationServiceProxy _serviceProxy = null;
                IServiceConfiguration<IOrganizationService> orgConfigInfo =
                    ServiceConfigurationFactory.CreateConfiguration<IOrganizationService>(new Uri("https://<myOrg>/XRMServices/2011/Organization.svc"));
                var creds = new ClientCredentials();
                creds.Windows.ClientCredential = new System.Net.NetworkCredential(connectionString.Username, connectionString.Password);
                using (_serviceProxy = new OrganizationServiceProxy(orgConfigInfo, creds))
                {
                    return (IOrganizationService)_serviceProxy;
                   
                }


throw an error:  The authentication endpoint Kerberos was not found on the configured Secure Token Service!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Dmytro Pidhrushnyi Profile Picture
    55 on at

    Works with following method:

    ClientCredentials Credentials = new ClientCredentials();
                    Credentials.UserName.UserName = UserName;
                    Credentials.UserName.Password = Password;
                    Credentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;
                    Uri OrganizationUri = new Uri("https://<myOrg>/XRMServices/2011/Organization.svc");
                    OrganizationServiceProxy serviceProxy = new OrganizationServiceProxy(OrganizationUri, null, Credentials, null);
                    return (IOrganizationService)serviceProxy;


    Problem solved. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Varsha deshpande Profile Picture

Varsha deshpande 5

#2
JS-09031509-0 Profile Picture

JS-09031509-0 3

#3
Ciprian  P Profile Picture

Ciprian P 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans