Is the Microsoft.PowerPlatform.Dataverse.Client supported?
andrew-sumner opened this issue · 1 comments
Is your feature request related to a problem? Please describe.
I'm migrating to AzureFunction V4 / net 6.0 using https://github.com/microsoft/PowerPlatform-DataverseServiceClient for D365 connectivity.
The below code gives a compiler error: IThe type 'IOrganizationService' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Cds.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
Is, or will this be, supported?
var crm = new ServiceClient(new Uri(d365url), GetTokenAsync, false, logger);
var context = new XrmRealContext(crm);
private async Task<string> GetTokenAsync(string instanceUri)
{
var credential = new DefaultAzureCredential(true);
var scope = new Uri(instanceUri).GetComponents(UriComponents.SchemeAndServer, UriFormat.UriEscaped);
scope += "/.default";
var acessToken = await credential.GetTokenAsync(new TokenRequestContext(new[] { scope }));
return acessToken.Token;
}
Describe the solution you'd like
I would like to use this in dotnet standard unit tests with the new dotnet standard DataverseServiceClient.
Describe alternatives you've considered
None
Additional context
Hi Andrew,
Support for the new .net core package lives on a separate repo here.
Please note the latest dataverse client package doesn't target .net standard, but .net core.
v1.x is in maintenance mode. We'll be merging outstanding PRs but focus is on that other repo.