Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

External app with C# code connecting to Crm and password expiration issue

$
0
0

I have an external app that communicate with Crm through C# code. In order to do this, I have to authenticate this way:

 IServiceManagement<IOrganizationService> orgServiceManagement = ServiceConfigurationFactory.CreateManagement<IOrganizationService>(new Uri("mycrm.crm.dynamics.com/.../Organization.svc"));
      AuthenticationCredentials authCredentials = new AuthenticationCredentials();
      authCredentials.ClientCredentials.UserName.UserName = "myuser@myCrm.onmicrosoft.com";
      authCredentials.ClientCredentials.UserName.Password = "mypassword";
      AuthenticationCredentials tokenCredentials = orgServiceManagement.Authenticate(authCredentials);

There are two things I hate from this method. First, everyone within my organization who have access to the code can see my password. Secondly, my password is set to expire every 90 days and this occasion problems. Is there a way to log with Crm not using a certain user and with a method that will not require me to set the password to never expire?

Thanks for your help


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>