microsoftgraph / microsoftgraph/msgraph-bicep-types

Support for `unifiedRoleAssignment` for different RBAC providers

Open
#123 3 comments 13 reactions 1 assignee View on GitHub

@jason-dou is already working on this.

Since May 28, 2024.

new type
Dominant language
TypeScript
Stars
80
Forks
15
Avg merge
1h 21m
Merged PRs (30d)
3

Description

Vote for this new type by clicking the thumbs-up.

Is your feature request related to a problem? Please describe.
I'm trying to add a new resource unifiedRoleAssignment, but there are several issues.

  1. Resource is under more URIs
    The resource unifiedRoleAssignment represents a role assignment, but the type is returned by more RBAC providers.
    All these endpoints return unifiedRoleAssignment:
    /roleManagement/directory/roleAssignments
    /roleManagement/entitlementManagement/roleAssignments
    /roleManagement/exchange/roleAssignments - beta only

Now, it's possible to specify only one RootUri.

  - Name: microsoft.graph.unifiedRoleAssignment
    RootUri: /roleManagement/directory/roleAssignments
    AvailableProperty:
      - appScopeId
      - directoryScopeId
      - principalId
      - roleDefinitionId
    RequiredOnWrite:
      - appScopeId
      - directoryScopeId
      - principalId
      - roleDefinitionId
  1. Wrong path generated
    Generated path for
  - Name: microsoft.graph.unifiedRoleAssignment
    RootUri: /roleManagement/directory/roleAssignments
    AvailableProperty:
      - appScopeId
      - directoryScopeId
      - principalId
      - roleDefinitionId
    RequiredOnWrite:
      - appScopeId
      - directoryScopeId
      - principalId
      - roleDefinitionId

Generated path is /{rootScope}/providers/Microsoft.Graph/directory/{directoryId}/roleAssignments/{unifiedRoleAssignmentId} which seems to me wrong. It should be /{rootScope}/providers/Microsoft.Graph/roleManagement/directory/roleAssignments/{unifiedRoleAssignmentId}/

Describe the solution you'd like
Maybe add new property EntityType. Config.yml can contain the same EntityType but with different combination of Name and RootUri

  - Name: microsoft.graph.entraRoleAssignment
    EntityType: microsoft.graph.unifiedRoleAssignment
    RootUri: /roleManagement/directory/roleAssignments
  - Name: microsoft.graph.exchangeRoleAssignment
    EntityType: microsoft.graph.unifiedRoleAssignment
    RootUri: /roleManagement/exchange/roleAssignments

Additional context
Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.