+| **PrincipalNotFound** | | - This error occurs when the **principal ID** (Service Principal, User, or Group) specified in a role assignment or deployment does not exist in the Azure Active Directory tenant<br>- It can also happen due to **replication delays** right after creating a new principal<br>**Example causes:**<br>- The specified **Object ID** is invalid or belongs to another tenant<br>- The principal was recently created but Azure AD has not yet replicated it<br>- Attempting to assign a role to a non-existing or deleted Service Principal/User/Group<br>**How to fix:**<br>1. Verify that the **principal ID is correct** and exists in the same directory/tenant: `az ad sp show --id <object-id>`<br>2. If the principal was just created, wait a few minutes and retry<br>3. Explicitly set the principalType property (ServicePrincipal, User, or Group) in your ARM/Bicep template to avoid replication delays<br>4. If the principal does not exist, create it again before assigning roles<br>- For more details, see [Azure PrincipalType documentation](https://learn.microsoft.com/en-us/azure/role-based-access-control/troubleshooting?tabs=bicep) |
0 commit comments