generated from hashicorp/terraform-provider-scaffolding-framework
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Is there a way to manage PIM for Entra Roles with this provider?
The APIs is a bit creative, and not following normal delete for deleting resources for example. Fails on Update as well
For example Role Eligibility Request
Delete
POST /roleManagement/directory/roleEligibilityScheduleRequests/{unifiedRoleEligibilityScheduleRequestId}/cancel
Docs
- https://learn.microsoft.com/en-us/graph/api/rbacapplication-post-roleeligibilityschedulerequests?view=graph-rest-1.0&tabs=http
- https://learn.microsoft.com/en-us/graph/api/unifiedroleeligibilityschedulerequest-cancel?view=graph-rest-1.0&tabs=http
Example error messages
Delete
Destroying... [id=62c252b0-7327-490f-9796-b3facca809d8]
╷
│ Error: Failed to delete resource
│
│ DELETE https://graph.microsoft.com/v1.0/roleManagement/directory/roleEligibilityScheduleRequests/956b93d3-04b2-4e67-bb2c-7067469bd163
│ --------------------------------------------------------------------------------
│ RESPONSE 404: 404 Not Found
│ ERROR CODE: UnknownError
│ --------------------------------------------------------------------------------
│ {
│ "error": {
│ "code": "UnknownError",
│ "message": "{\"message\":\"No HTTP resource was found that matches the request URI 'https://api.azrbac.mspim.azure.com/api/v3/roleManagement/directory/roleEligibilityScheduleRequests('956b93d3-04b2-4e67-bb2c-7067469bd163')?'.\"}",
│ "innerError": {
│ "date": "2025-10-11T15:02:25",
│ "request-id": "e3f96448-9190-4ea8-a1b2-c4bc87549a56",
│ "client-request-id": "e3f96448-9190-4ea8-a1b2-c4bc87549a56"
│ }
│ }
│ }
Update
│ 16: resource "msgraph_resource" "group_role_assignment" {
│
│ PATCH https://graph.microsoft.com/v1.0/roleManagement/directory/roleEligibilityScheduleRequests/62c252b0-7327-490f-9796-b3facca809d8
│ --------------------------------------------------------------------------------
│ RESPONSE 404: 404 Not Found
│ ERROR CODE: UnknownError
│ --------------------------------------------------------------------------------
│ {
│ "error": {
│ "code": "UnknownError",
│ "message": "{\"message\":\"No HTTP resource was found that matches the request URI 'https://api.azrbac.mspim.azure.com/api/v3/roleManagement/directory/roleEligibilityScheduleRequests('62c252b0-7327-490f-9796-b3facca809d8')?'.\"}",
│ "innerError": {
│ "date": "2025-10-11T15:01:46",
│ "request-id": "942d7b4f-f0d1-4602-9178-2a30582be503",
│ "client-request-id": "942d7b4f-f0d1-4602-9178-2a30582be503"
│ }
│ }
│ }
Metadata
Metadata
Assignees
Labels
No labels