admin管理员组

文章数量:1122847

As far as I know there is a (relatively new) capability in PowerPlatform, named named Virtual Network support for Power Platform. In essece, it allows Dataverse plug-ins to access our Azure Tenant's local resources (our APIs, SQL servers, etc.), achieving a similar functionality to a VPN.

The documentation states the following (excrepts):

Use Dataverse plug-ins to securely connect to private, endpoint-protected resources in Azure, such as Web API, or any resources within your private network, such as SQL and Web API. (...) Yes. Power Platform uses the custom DNS configured in the Virtual Network that holds the delegated subnet to resolve all endpoints. (...)

In my understanding, if we configure VNet support to one of our Dataverse environments, and create a plugin in that environment, similar to the following code, we should be able to reach our Azure Tenant's resources.

using System.Net.Http;

namespace Plugin.Test;

public class TestPlugin : IPlugin
{
    public void Execute(IServiceProvider serviceProvider)
    {
        try
        {
            using var client = new HttpClient();
            client.GetAsync("http://myVMsName/").GetAwaiter().GetResult(); // An Azure VM's DNS name in our Azure Tenant
        }
        catch (Exception ex)
        {
            throw new InvalidPluginExecutionException(ex.ToString());
        }
    }
}

However, registering this plugin to an event (for example the Account's Create), and triggering it, the following error occurs:

The remote name could not be resolved: 'myVMsName'

We already opened a support ticket towards Microsoft, and they confirmed and checked that the VNet support for Power Platform component was properly configured, and there is an existing server with the name myVMsName in the same VNET as the Power Platfrom should inject into, and that responds with a proper HTTP answer.

Have anyone succeeded with a similar effort? Or does anyone have any further insight to this problem? Thank you

本文标签: cDataverse plugin accessing APIs inside company39s Azure Tenant errorStack Overflow