Reputation: 1474
I am connecting to Dynamics 365 in the Cloud using the .Net package: Microsoft.PowerPlatform.Dataverse.Client v1.2.3. I am behind a corporate API Gateway and as a result my base address for Dynamics is no longer
https://organization.crm4.dynamics.com/
But rather (with the additional path):
https://apigw.organization.com/api/dynamics/
I want to make use of the meta data calls to get OptionSet values (and other), so I am doing this:
//Create the client
client = new ServiceClient(
fullUri,
async (string arg) =>
{
//custom oauth call
return await oAuthService.GetTokenAsync().AccessToken;
},
true);
// Get the option set values
var res = client.Execute(new RetrieveAttributeRequest
{
EntityLogicalName = "account",
LogicalName = "someAttribute",
RetrieveAsIfPublished = true
});
When I execute this I get:
There was no endpoint listening at https://apigw.organization.com/XRMServices/2011/Organization.svc/web?SDKClientVersion=9.2.49.14828
i.e. it removes the path (api/dynamics/) and uses just the domain, the path is required to access it through the gateway.
Is there a way to force it to use the full path? And why is it using the Organization.svc service anyway, is that no old?
Upvotes: 0
Views: 16