Open
Description
How to reproduce
var crmUri = "Some uri"; var uri = new Uri(crmUri"); var options = new ConnectionOptions { AuthenticationType = Microsoft.PowerPlatform.Dataverse.Client.AuthenticationType.AD, UseCurrentUserForLogin = true, ServiceUri = uri }; var serviceClient = new ServiceClient(options);
running script will throw a ArgumentNullException, something along the lines of a value cannot be null.
Going through the code shows that the CreateConnectionStringFromConnectionOptions method in DynamicCrmConstants is the issue. There is no check on the Password field to check if it is null or not causing line 44 to throw the exception.
Correct fix would be to have a null or empty check for username and password as is the case in the OAuth case.