SAIFTRBL0020 ยท permalink
No group found matching specified filter for a business role¶
If the auth_corp deployment fails with No group found matching specified filter on data.azuread_group.role_assignments, a business role referenced in infra/auth/corp/config.yml has no Entra group for that environment. Create or deploy the business role in your project's corporate business roles repository for that environment, then re-run the failed stage.
๐จ Symptom¶
The ๐ Terraform Apply step of the Deploy auth_corp (terraform) job fails during the plan:
Error: No group found matching specified filter (displayName eq 'bus-role.customer support portal users' and securityEnabled eq true)
with module.application_permissions.data.azuread_group.role_assignments["bus-role.customer support portal users"],
on .terraform/modules/application_permissions/main.tf line 55, in data "azuread_group" "role_assignments":
55: display_name = each.key
The group name is the business role name in lowercase with a prefix that depends on the environment:
| Environment | Group name |
|---|---|
prod |
bus-role.<business role> |
| Every other environment | bus-role-np.<business role> |
A business role that works in Test, QA, and UAT but fails in production usually has only its bus-role-np. group.
๐ Applies to¶
APIs that map business roles to app roles through the Forge application-permissions module, meaning infra/auth/corp/config.yml has a business_roles list.
Do not use this fix if the group exists with the expected name. Check the spelling of the business role in infra/auth/corp/config.yml against the business roles repository, because a misspelled name produces the same error.
Prerequisites and safety¶
- Read access to Entra ID groups through the
saifCLI, or through the Azure CLI afteraz login. - Permission to change and deploy your project's corporate business roles repository. See Business Roles for how to find it.
- The failed apply did not change anything in Entra for the
auth_corpdeployment, because the error happens during the plan.
โ Fix¶
-
Confirm which group is missing. Search for the business role with the group name from the error:
The command strips the
bus-role.orbus-role-np.prefix and shows whether a group with that name exists in each environment. A role with only its non-production group showsโunderProd. The command reads group names with the least-privilegeGroup.ReadBasic.Allpermission, which hides whether a group is security-enabled, so it cannot tell a security group from a non-security group that has the same name. The module's lookup accepts only security groups.โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโฎ โ Name โ Non Prod โ Prod โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโค โ customer support portal users โ โ โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโฏ 1 business roleIf your
saifCLI has nobusiness-rolecommand (update the SAIF CLI to get it), or the command reports that Microsoft Graph denied the group lookup, check each group with the Azure CLI instead:az ad group list --display-name 'bus-role.<business role>' --query "[].{name:displayName, security:securityEnabled}" -o table az ad group list --display-name 'bus-role-np.<business role>' --query "[].{name:displayName, security:securityEnabled}" -o table--display-namematches names that start with the value, so check for an exact match in the output. -
If the business role does not exist in the business roles repository, add it there. See Business Roles.
- Run the business roles pipeline and deploy it to the environment from the error. For a production failure, that means the production stage.
- Re-run the failed stage of the API pipeline. Only re-run the stage if the run was queued recently. A run queued before a pipeline-templates change keeps the old templates. See Terraform Init fails with 401 Unauthorized from tf.pulumi.com.
๐ฌ Verify¶
saif business-role search shows โ under the environment from the error. If the deployment still fails with the same error after a โ, check that the group is a security group. With the Azure CLI, the az ad group list command for the name in the error returns an exact name match with security set to True.
The re-run Deploy auth_corp (terraform) job completes, and the plan refreshes data.azuread_group.role_assignments["<group name>"] without an error.
๐ง Cause¶
The application-permissions module turns each business role in business_roles into a group name, bus-role.<role> in production and bus-role-np.<role> elsewhere, and looks it up with a data "azuread_group" lookup filtered to security groups. The business roles repository creates those groups through its own pipeline, separately from the API. A data source must find the object it asks for, so Terraform stops the plan when the group for that environment does not exist yet.
๐ Related¶
- Business Roles
- Deployment Workflow
saif business-role search- Application not found: no applications found matching filter on pre_authorized
- Source: Azure DevOps build 213857 (
it-api-sys-invites-api), production deploy on 2026-10-15