Skip to main content

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:

RoleAssign it onRequired
Storage Blob Data ContributorThe Azure Storage accountYes
Azure Batch Data ContributorThe Azure Batch accountYes
Managed Identity OperatorEach managed identityIf you create a managed identity (recommended). Without this role, Seqera cannot attach the managed identity to a Batch pool.
Network ContributorThe VNetIf 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:

RoleAssign it onWhy
Storage Blob Data ContributorThe Azure Storage accountThe pool VMs need this role to read inputs and write outputs.
AcrPullAny Azure Container Registry the pipeline pulls images fromWithout 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.