microsoftgraph / microsoftgraph/msgraph-metadata
Entra Id Group (not role assignable) fails to remove Owners if last Owner is a SPN
Nobody has claimed this yet.
- Dominant language
- XSLT
- Stars
- 166
- Forks
- 55
- Avg merge
- 16h 12m
- Merged PRs (30d)
- 14
Description
Hi,
as suggested in https://github.com/hashicorp/terraform-provider-azuread/issues/1435 I am raising this issue here as well since this error is not related to Terraform and also happening in the Azure Portal UI.
Scenario 1
A group has two Owner objects of which one is a SPN. I am trying to remove the 2nd Owner object which is not a SPN (SPN = last Owner).
Case 1
Role Assignable Group (Single Object Remove):
I am able to remove a 2nd Owner (Terraform & UI).
Case 2
Not Role Assignable Group (Single Object Remove):
I am not able to remove a 2nd Owner (Terraform & UI).
Note: This is only true if the last remaining Owner is a SPN. It is possible if the last object is a user object.
Scenario 2
A group has three or more Owners of which one is a SPN. I am trying to remove all Owner objects which are not a SPN (SPN = last Owner).
Case 3
Not Role Assignable Group (Multiple Object Remove / batch as highlighted here):
UI -> I am able to remove all Owner objects by selecting all objects but the SPN.
Terraform -> I am not able to remove all Owner objects because the Terraform Provider does this one by one.
Error Details
UI -> Failed to remove group owner. The group must have at least one owner.
Terraform -> Error: GroupsClient.BaseClient.Delete(): unexpected status 400 with OData error: Request_BadRequest: The group must have at least one owner, hence this owner cannot be removed.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the linked terraform-provider-azuread issue #1435 and compare the three owner-removal scenarios described here in the Azure Portal and Terraform. No repository file or test is identified in the report; done would require confirming the behavior and establishing a documented resolution or disposition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- api, authorization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100