Use Service Principals to create shortcuts to ADLS Gen2 storage accounts with trusted access
You now have the capability with service principals to create shortcuts to Azure Data Lake Storage (ADLS) Gen2 storage accounts that have firewall enabled.
Previously, the creation of ADLS Gen2 shortcuts by service principals was restricted when firewall settings were active. However, with the latest changes, service principals will be able to navigate these restrictions and create shortcuts efficiently.
Steps to create a shortcut with Trusted access as a Service Principal
Step 1: Configure the Storage Account for Trusted Access with Fabric
- Ensure that the storage account is set up for trusted access with Fabric by following the guidance in Configure trusted workspace access in ADLS Gen2.
- Ensure the prerequisite for shortcut creation with trusted access are done by following the guidance in Prerequisites – Create a OneLake shortcut to storage account with trusted workspace access.
Step 2: Create a connection or modify an existing connection
Ensure that the service principal can use Fabric APIs by modifying the tenant settings. Then follow the steps listed in this section.
- As a service principal, create a connection to the storage account using the create connection API. You can use principals such as service principals, workspace identities, and organizational accounts as the authentication method for the connection. The principal used for authentication must have permissions on the ADLS gen 2 account.
- If you’re using an existing connection, make sure that the service principal has a user role on the connection. You can do this by calling the Update Connection Role Assignment API.
Step 3: Create the shortcut using the Create Shortcut API
As a service principal, create the shortcut by calling the create shortcut API and provide the connection id from Step 2.
Conclusion
This is a significant improvement in automation of shortcut creation for customers, and we hope you enjoy this new capability. Submit your feedback on Fabric Ideas and join the conversation on the Fabric Community.