Skip to content

When missing lead"/" in scope filter parameter, returns unexpected policy object #24184

Open
@jwelker9

Description

@jwelker9

Issue is regarding the Role Management Policies - List for Scope API. When following the sample, and filtering on a roleDefinitionID, you are expected to provide a 'scope' to complete the full role definition ID, like below:

$filter=roleDefinitionId%20eq%20'/subscriptions/29c076b3-d962-4cd7-97cd-a518d5e0c05c/providers/Microsoft.Authorization/roleDefinitions/18d7d88d-d35e-4fb5-a5c3-7773c20a72d9'

The above works as expected. However, when the lead "/" is omitted on the scope portion, it still returns a role management policy object; however, it's not one that matches the roleDefinitionId. Because there is no role name identifier (neither name or id) in the role policy object responses generally, I can't determine which policy is being returned.

Example of omitted "/" (right after the "eq" statement and before "subscriptions"):
$filter=roleDefinitionId%20eq%20'subscriptions/29c076b3-d962-4cd7-97cd-a518d5e0c05c/providers/Microsoft.Authorization/roleDefinitions/18d7d88d-d35e-4fb5-a5c3-7773c20a72d9'

Regardless, I would expect that with a missing "/" in the scope portion of the roleDefinitionId, it would either return nothing, or an error stating the scope is invalid, rather than a seemingly random policy object not related to the roleDefinitionId you are filtering for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AuthorizationService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions