Securing Cross-Tenant Data Transfers in Microsoft Fabric Using Managed Private Endpoints
From the publisher’s feed, collected in the ZeroLabs newsroom.
In today’s highly complex and interconnected enterprise environments, we often find that our data does not live neatly within a single logical boundary. Following corporate mergers, acquisitions, or simply the organic growth of decentralized IT departments, our organizational data frequently resides scattered across multiple Azure Entra ID (formerly Azure Active Directory) tenants or entirely separate cloud environments.When we embark on building enterprise-grade analytics solutions using Microsoft Fabric, we immediately face a significant architectural challenge: how do we ingest, process, and analyze this distributed data without compromising our strict security postures?Historically, we might have relied on exposing our storage accounts over public endpoints, utilizing Shared Access Signature (SAS) tokens to grant our analytical tools access to the data. However, as our security teams will readily point out, this approach directly violates modern zero-trust policies. Exposing data to the public internet, even with complex token-based authentication, introduces the risk of data exfiltration, token leakage, and unauthorized access.To solve this critical security challenge, we will leverage Managed Private Endpoints within Microsoft Fabric. In this detailed walkthrough, we will explore how we can configure Microsoft Fabric to connect directly and securely to external Azure Blob and ADLS Gen2 accounts across tenant boundaries, ensuring that our network traffic never traverses the public internet.Enterprise Security & The Cross-Tenant ProblemBefore we dive into the technical configuration, we must first understand the fundamental problem we are trying to solve. In a standard single-tenant architecture, securely connecting our analytical workspaces to our storage layers is a well-documented and straightforward process. We can easily utilize Azure Private Link, Virtual Network (VNet) peering, or trusted service bypasses to ensure our data remains on the secure Microsoft backbone network.However, when our target Azure Data Lake Storage (ADLS) Gen2 account resides in a completely different Azure Entra ID tenant (Tenant B). At the same time, our Microsoft Fabric instance resides in Tenant A, the complexity increases exponentially. We cannot rely on simple role-based access control (RBAC) trusted service exceptions across organizational boundaries in the same seamless manner.If we choose the easy path of enabling public network access on the target storage account, we expose our organization to severe vulnerabilities. Even if we strictly limit IP addresses via firewalls, maintaining an ever-changing list of IP addresses is an operational nightmare. Furthermore, relying on SAS tokens over public endpoints means that if a token is accidentally committed to a source control repository or intercepted, malicious actors could access our highly sensitive datasets from anywhere in the world.Therefore, we must embrace a zero-trust architecture. We will do this by implementing Managed Private Endpoints. By adopting this approach, we ensure that our data transfer happens entirely over the Microsoft backbone network via a private IP address, rendering the data invisible to the public internet.Fabric Managed Virtual Networks & Private EndpointsTo implement this secure cross-tenant connection, we need to understand the underlying architecture of Microsoft Fabric’s networking capabilities.When we provision a Microsoft Fabric workspace, it traditionally operates within a multi-tenant software-as-a-service (SaaS) environment. However, Microsoft Fabric allows us to enable a Managed Virtual Network (Managed VNet) for our workspaces. When we enable this feature, Fabric provisions a dedicated, isolated virtual network on our behalf to host the compute clusters, such as our Apache Spark pools, that run our data engineering and data science workloads.This Managed VNet acts as our secure, isolated boundary within the cloud. From this Managed VNet, we can request a Managed Private Endpoint. A Private Endpoint is essentially a network interface that uses a private IP address from our virtual network to connect us privately and securely to a service powered by Azure Private Link.In our cross-tenant scenario, the architecture flows as follows:The Origin: Our Microsoft Fabric Spark compute nodes operate securely within our Workspace’s Managed VNet (Tenant A).The Bridge: We provision a Managed Private Endpoint within this Fabric Managed VNet. This endpoint requests a secure connection to the specific Azure Resource Manager (ARM) ID of our target storage account.The Destination: The target ADLS Gen2 storage account (Tenant B) receives a pending Private Endpoint connection request.The Resolution: Once the security administrator in Tenant B approves the request, Azure Private Link establishes a secure tunnel. Microsoft Fabric handles the complex DNS resolution seamlessly in the background, ensuring that when our PySpark code asks for stfabrichubprod.dfs.core.windows.net, it resolves to a private IP address on the Microsoft backbone rather than a public IP.We will now walk through the precise steps required to implement this architecture.Requesting the Endpoint from the Fabric WorkspaceTo begin our configuration, we will navigate to our Microsoft Fabric portal. We must ensure that we have Workspace Admin privileges and that our workspace is backed by a dedicated Fabric capacity (such as an F-SKU) that supports Managed VNets.1. Enabling the Managed Virtual NetworkFirst, we will go to our Workspace Settings. Under the Network security tab, we will locate the option for the Managed Virtual Network. If it is not already enabled, we will toggle it on. This action instructs Fabric to begin spinning up an isolated VNet for our Spark compute workloads. It is important to note that this initial provisioning can take a few minutes, as we are allocating dedicated network infrastructure in the background.2. Identifying the Target Resource IDBefore we can request the connection, we need the exact Azure Resource Manager (ARM) ID of the target storage account located in the external tenant. We will ask our counterpart (the storage administrator in the other tenant) to provide this ID. It typically looks like this:/subscriptions/12345678-1234-1234-1234-123456789abc/resourceGroups/rg-data-prod/providers/Microsoft.Storage/storageAccounts/stfabrichubprod3. Creating the Managed Private EndpointOnce our Managed VNet is active, we will stay within the Network security tab of our Workspace Settings and navigate to the Managed private endpoints section. We will click on Create.A configuration pane will appear, prompting us for several details. We will fill them out as follows:Name: We will provide a clear, descriptive name for our endpoint, such as mpe-cross-tenant-storage.Resource Type: We will select Microsoft.Storage/storageAccounts.Target Sub-resource: Since we are utilizing ADLS Gen2 for our data lake workloads, we will carefully select dfs (Distributed File System) rather than blob. This is a crucial distinction for ensuring our hierarchical namespace operations perform correctly.Resource Identifier: Here, we will paste the full ARM ID of the storage account from the external tenant that we obtained earlier.Request Message: We will leave a polite and informative message for the external tenant administrator, such as: “Requesting cross-tenant access for Microsoft Fabric Data Engineering Workspace in Tenant A.”Once we submit this form, Microsoft Fabric will initiate the connection request. The state of our Managed Private Endpoint within the Fabric portal will show as Pending. Fabric cannot force its way into the other tenant; we must wait for the owner of the destination resource to explicitly approve our request.Executing Azure CLI in the Target TenantWe have successfully initiated the handshake from our Microsoft Fabric workspace. Now, we must change our perspective. We will assume the role of the security administrator governing the target storage account (stfabrichubprod) residing in the external Azure Entra ID tenant.Security best practices dictate that cross-tenant connections should be carefully audited and approved through infrastructure-as-code (IaC) or automated scripting rather than manual portal clicks, ensuring an immutable audit trail. To achieve this, we will utilize the Azure Command-Line Interface (Azure CLI) to review and approve the incoming request.We will open our terminal and execute the following secure approval workflow.Step 1: Authenticate to the Target TenantFirst, we must log into the specific Azure tenant that hosts the data. We will use the --tenant flag to ensure our CLI session is strictly scoped to the correct directory.# 1. Login to the Target Tenant hosting the ADLS Gen2 Storage Accountaz login --tenant target-tenant-id-xxxx-xxxx-xxxxWhen we execute this, an interactive browser window will prompt us for our secure credentials and Multi-Factor Authentication (MFA).Step 2: Audit Pending ConnectionsBefore approving anything, we must inspect the pending requests to verify their legitimacy. We will list all private endpoint connections associated with our critical storage account.# 2. List pending private endpoint connections from Microsoft Fabricaz network private-endpoint-connection list \ --resource-group rg-data-prod \ --name stfabrichubprod \ --type Microsoft.Storage/storageAccountsUpon executing this command, we will receive a JSON payload detailing the incoming connections. We will look closely at the privateLinkServiceConnectionState object. We should see a connection in the Pending state, alongside the description we provided earlier from the Fabric portal. We will also make note of the unique connection name, which typically appends a unique identifier to the storage account name (e.g., stfabrichubprod.a1b2c3d4-xxxx-xxxx).Step 3: Approve the ConnectionAfter verifying that the request originates from our trusted Fabric workspace, we will formally approve the connection. We will use the approve command, explicitly passing the unique connection name we identified in the previous step. We will also append a description to document who approved this and why.# 3. Approve the connection request submitted from Fabric Managed VNetaz network private-endpoint-connection approve \ --resource-group rg-data-prod \ --name stfabrichubprod.a1b2c3d4-xxxx-xxxx \ --type Microsoft.Storage/storageAccounts \ --description "Approved Fabric Workspace Cross-Tenant Connection"Once this command completes successfully, the Azure networking fabric establishes the secure Private Link. If we return to our Microsoft Fabric workspace, we will notice that the status of our Managed Private Endpoint transitions from Pending to Approved.PySpark Notebook VerificationWith the infrastructure securely linked across tenant boundaries, we reach the most exciting part of our journey: validating the data connection. We must prove that our Fabric workspace can read the data seamlessly, without any exposure to the public internet.To validate our setup, we will navigate back to our Microsoft Fabric workspace and create a new Notebook. We will attach this notebook to the Spark environment running within our Managed VNet.We will use PySpark to attempt a read operation against the cross-tenant storage account. Because the Managed Private Endpoint handles the complex internal DNS resolution, we do not need to use any special endpoint URLs or proxy configurations. We will address the storage account exactly as we would if it were a local, public resource, using the standard ABFS (Azure Blob File System) URI.In the first cell of our notebook, we will input and execute the following PySpark snippet:# PySpark test snippet inside Fabric Notebook connected via Private Endpointdf_cross_tenant = ( spark.read.format("parquet") .load("abfss://secured-container@stfabrichubprod.dfs.core.windows.net/sales_data/")print(f"Successfully retrieved {df_cross_tenant.count()} records securely across tenants.")Let us analyze what happens under the hood when we execute this cell.When the Spark driver attempts to resolve stfabrichubprod.dfs.core.windows.net, the DNS request is intercepted by the internal DNS servers within the Fabric Managed VNet. Because we established the Managed Private Endpoint, the DNS server correctly resolves the fully qualified domain name (FQDN) to the private IP address of our endpoint.The Spark compute engine then establishes a secure, encrypted TLS connection directly to that private IP. The traffic flows out of the Fabric Managed VNet, travels securely across the Microsoft Azure backbone network, traverses the tenant boundary invisibly via Azure Private Link, and arrives at the target storage account.Because we have eliminated public network access, any attempt to run this exact same PySpark code from a local machine over the public internet would instantly fail with a 403 Forbidden error. Yet, within our secure Fabric environment, the execution succeeds flawlessly, and we are greeted with the total count of our cross-tenant records.Ensuring Proper AuthenticationIt is worth noting that while we have solved the network security challenge, we still need to handle identity security. In our PySpark example above, we assumed that we have configured credentials (such as a Service Principal, Managed Identity, or passed-through Entra ID credentials) that have the appropriate Storage Blob Data Contributor or Storage Blob Data Reader RBAC roles on the target storage account. The Private Endpoint secures the path, but the storage account will still enforce strict authorization checks on the identity attempting to read the data. We must ensure our external tenant administrator has granted our Fabric service principal the necessary permissions.ConclusionIn this comprehensive guide, we have successfully tackled one of the most pressing challenges in modern enterprise data architecture: securely sharing data across organizational and tenant boundaries. By leveraging Managed Private Endpoints within Microsoft Fabric, we have demonstrated how we can completely eliminate the need for publicly accessible storage endpoints and risky SAS tokens.We have explored the underlying architecture of Fabric Managed VNets, walked through the precise steps required to initiate a cross-tenant connection, utilized the Azure CLI to formally approve the request on the destination side, and successfully validated our secure pipeline using PySpark.By adopting these patterns, we ensure that our data platforms strictly adhere to zero-trust principles. We keep our sensitive enterprise data exactly where it belongs, off the public internet and safely within the secure confines of the Microsoft backbone. We hope this step-by-step walkthrough empowers our data engineering and security teams to build more robust, secure, and collaborative cross-tenant analytics solutions in the future.Hey, I am Sandip Palit, from Kolkata, India. I love to explore what’s new in the Data Science space and share it with the community. I am a Fabric Super User, and in this Microsoft Fabric Playlist, I will share my learnings on Microsoft Fabric and the tips and tricks of using it effectively..Thank You for reading this article. Please feel free to share your thoughts in the comments section, and give this article a 🌟.Securing Cross-Tenant Data Transfers in Microsoft Fabric Using Managed Private Endpoints was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.