Skip to content

[Bug] Using AuthenticationType AD and UseCurrentUserForLogin = true results in ArgumentNullException #339

Open
@NAMiedema

Description

@NAMiedema

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    InvestigatingWe are looking into this issue at this time.On PremisesIssue applies to On Premises version of Dataverse.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions