-
Notifications
You must be signed in to change notification settings - Fork 217
Description
Describe the bug
Issue
Passing filters to (at the very least, haven't tested others) Get-MgBetaDeviceAppManagementMobileApp which contain a term filtering on a string containing a '+' followed by a term wrapped in parentheses results in incorrect return results.
Version: 2.35.1
Examples
I have two win32 apps called "PMPC - Notepad++" and "PMPC - Test"
Notepad++
Get-MgBetaDeviceAppManagementMobileApp -Filter "(DisplayName eq 'PMPC - Notepad++') and (isof('microsoft.graph.win32LobApp))
Returns no matching apps
Get-MgBetaDeviceAppManagementMobileApp -Filter "(DisplayName eq 'PMPC - Notepad++') and isof('microsoft.graph.win32LobApp)
Returns the proper app
Notepad++ URL-encoded
Get-MgBetaDeviceAppManagementMobileApp -Filter "(DisplayName eq 'PMPC - Notepad%2B%2B') and (isof('microsoft.graph.win32LobApp))
Returns no matching apps
Get-MgBetaDeviceAppManagementMobileApp -Filter "(DisplayName eq 'PMPC - Notepad%2B%2B') and isof('microsoft.graph.win32LobApp)
Returns the proper app
Test App (no +)
Get-MgBetaDeviceAppManagementMobileApp -Filter "(DisplayName eq 'PMPC - Test') and (isof('microsoft.graph.win32LobApp))
Returns the proper app
Get-MgBetaDeviceAppManagementMobileApp -Filter "(DisplayName eq 'PMPC - Test') and isof('microsoft.graph.win32LobApp)
Returns the proper app
I have tried with other combinations of filter components, including creating more complex nested filters on the right-hand side of the "and" term to see if parentheses begin working when required by syntax, but all attempts result in the same behavior. It appears that the set of parentheses is somehow causing the URI to resolve the plus to a space, while without the parentheses it properly resolves to %2B
Expected behavior
Can filter on string literals containing a '+' without having to worry about the structure of the rest of the filter query.
How to reproduce
- Create an app/configuration containing a "+' in the DisplayName. ie, Notepad++
- Use the proper Get- command to filter on that app following the structure
Get-MgBetaX -Filter "({component 1 containing a '+' string literal}) and ({any other filter component})"
SDK Version
2.35.1
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
powershell 7.5.4 core, windows 10.0.26100
### Other information
_No response_