---
title: "No group found matching specified filter for a business role"
description: The auth_corp deployment fails because a business role in infra/auth/corp/config.yml has no Entra group in the target environment. Deploy the business role to that environment first, then re-run the failed stage.
id: SAIFTRBL0020
tags:
  - troubleshooting
  - terraform
  - authentication
---

# 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:

```text
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 `saif` CLI, or through the Azure CLI after `az login`.
- Permission to change and deploy your project's corporate business roles repository. See [Business Roles](../build/identity/configuration/business-roles.md) for how to find it.
- The failed apply did not change anything in Entra for the `auth_corp` deployment, because the error happens during the plan.

---

## ✅ Fix

1. Confirm which group is missing. Search for the business role with the group name from the error:

    ```powershell
    saif business-role search "bus-role.<business role>"
    ```

    The command strips the `bus-role.` or `bus-role-np.` prefix and shows whether a group with that name exists in each environment. A role with only its non-production group shows `✗` under `Prod`. The command reads group names with the least-privilege `Group.ReadBasic.All` permission, 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.

    ```text
    ╭───────────────────────────────┬──────────┬──────╮
    │ Name                          │ Non Prod │ Prod │
    ├───────────────────────────────┼──────────┼──────┤
    │ customer support portal users │ ✓        │ ✗    │
    ╰───────────────────────────────┴──────────┴──────╯
    1 business role
    ```

    If your `saif` CLI has no `business-role` command ([update the SAIF CLI](../learn/install-saif-cli.md#update-the-saif-cli-binary-itself) to get it), or the command reports that Microsoft Graph denied the group lookup, check each group with the Azure CLI instead:

    ```powershell
    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-name` matches names that start with the value, so check for an exact match in the output.

2. If the business role does not exist in the business roles repository, add it there. See [Business Roles](../build/identity/configuration/business-roles.md).
3. Run the business roles pipeline and deploy it to the environment from the error. For a production failure, that means the production stage.
4. 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](terraform-init-tf-pulumi-com-401-unauthorized.md).

---

## 🔬 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](../build/identity/configuration/business-roles.md)
- [Deployment Workflow](../build/identity/configuration/deployment-workflow.md)
- [`saif business-role search`](../reference/cli-workflows.md#saif-business-role-search)
- [Application not found: no applications found matching filter on pre_authorized](application-permissions-pre-authorized-application-not-found.md)
- Source: Azure DevOps build 213857 (`it-api-sys-invites-api`), production deploy on 2026-10-15
