Skip to content

Get-AzApiManagementUser doesn't provide result if $filter parameter contains + #22050

Open
@mumurug-MSFT

Description

@mumurug-MSFT

Description

When the email prefix contains a '+', no result will return for the following command:
$apimUser = Get-AzApiManagementUser -Context $apimContext -Email $emailAddress

However, https://learn.microsoft.com/en-us/rest/api/apimanagement/current-ga/user/list-by-service works fine and found that it is related to encoding URL. Manually, encoding the parameter value such as $encodedEmail=[System.Web.HttpUtility]::UrlEncode("abc+@contoso.com") before passing works good.

Is this expected? If so, we may need to add this to docs.

Expected behavior:
Provide results for the user with that specific email address.

Example:
Body:
{
"value": [
{
"id": "/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.ApiManagement/service/xxx/users/abc-contoso-com",
"type": "Microsoft.ApiManagement/service/users",
"name": "abc-contoso-com",
"properties": {
"firstName": "ABC",
"lastName": "XYZ",
"email": "abc+@contoso.com",
"state": "active",
"registrationDate": "2023-06-12T16:37:32.647Z",
"note": null,
"identities": [
{
"provider": "Basic",
"id": "abc+@contoso.com"
}
]
}
}
],
"count": 1
}

Script or Debug output

Actual output:

Body:
{
  "value": [],
  "count": 0
}

Environment data

No response

Module versions

No response

Error output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    API ManagementService AttentionThis issue is responsible by Azure service team.questionThe 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