Data8 / DataverseClient

WS-Trust compatible version of the Microsoft Dataverse client for .NET Core
MIT License
32 stars 14 forks source link

using AD authenticaiton with correct user id and pwd, but getting the error unable to find authentication policy #45

Open nshehzad opened 2 weeks ago

nshehzad commented 2 weeks ago

using this code below, but getting error unable to find authentication policy. Please see screen attached

using Data8.PowerPlatform.Dataverse.Client;
using Microsoft.PowerPlatform.Dataverse.Client;
using Microsoft.Xrm.Sdk;

var onPremAD = new OnPremiseClient("https://crm.contoso.com/org/XRMServices/2011/Organization.svc", "AD\\username", "password!");

CreateRecord(onPremIfd);
CreateRecord(onPremAD);
CreateRecord(online);

void CreateRecord(IOrganizationService svc)
{
    var entity = new Entity("account")
    {
        ["name"] = "Data8"
    };

    entity.Id = svc.Create(entity);
}

image

MarkMpn commented 2 weeks ago

The library can't find the details in the WSDL document describing how it should authenticate to the service. I haven't seen this happen on a real server before so I'm not sure what the ultimate fix will be, but to start with it would be useful to see the contents of the WSDL file - start from https://crm.contoso.com/org/XrmServices/2011/Organization.svc?wsdl&sdkversion=8.0.0.0 and also follow any links to imported WSDL documents, normally https://crm.contoso.com/org/XrmServices/2011/Organization.svc?wsdl=wsdl0