Azure Batch roles
Seqera accesses your Batch account and Storage account through the roles assigned to the Microsoft Entra service principal in your Azure Batch credentials. Azure Batch uses built-in roles, so there is no custom role to create. Decide which roles you need, then assign them when you create the credentials.
Service principal
Seqera uses the service principal to authenticate to Azure Batch and Azure Storage. Assign it the following roles:
| Role | Assign it on | Required |
|---|---|---|
| Storage Blob Data Contributor | The Azure Storage account | Yes |
| Azure Batch Data Contributor | The Azure Batch account | Yes |
| Managed Identity Operator | Each managed identity | If you create a managed identity (recommended). Without this role, Seqera cannot attach the managed identity to a Batch pool. |
| Network Contributor | The VNet | If you deploy Batch pools into a private VNet. You specify a Subnet ID when you create the compute environment. You can use a custom role that grants Microsoft.Network/virtualNetworks/subnets/join/action instead. |
Azure Batch Data Contributor is sufficient for pool creation and is narrower than the general Azure Batch Account Contributor role. The general role also grants permission to create and delete Batch accounts and to regenerate shared keys, which Batch Forge does not need.
Only the service principal needs VNet permissions. The head and pool managed identities do not.
Managed identity
Nextflow authenticates to Azure Batch and Storage with the managed identity attached to the node pool. Assign the managed identity the following roles:
| Role | Assign it on | Why |
|---|---|---|
| Storage Blob Data Contributor | The Azure Storage account | The pool VMs need this role to read inputs and write outputs. |
| AcrPull | Any Azure Container Registry the pipeline pulls images from | Without this role, container pulls fail when the pool VM authenticates with the managed identity. |
When you use separate head and worker pools, you can assign a different managed identity to each pool. Typically, the head managed identity needs broader Batch and storage permissions, while the worker managed identity needs only storage and AcrPull access.
See Required role assignments for more information.
Access keys
Access keys provide full access to the Azure Storage and Azure Batch accounts, so they need no role assignments. Access keys do not support VNet/subnet configuration, and shared-key credentials cannot create pools with managed identities.
Next step
Create the credentials and assign the roles. See Azure Batch credentials.