Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SignInsRequestBuilderGetRequestConfiguration $queryParameters->filter is really doing case sensitive $filter #1571

Open
Teejer opened this issue Aug 28, 2024 · 2 comments

Comments

@Teejer
Copy link

Teejer commented Aug 28, 2024

Describe the bug

When doing a query for signins for users it is doing a case sensitive search, $filter, instead of the case insensitive search, filter. I got the following from fiddler.
https://graph.microsoft.com/v1.0/auditLogs/signIns?$filter=userPrincipalName%20eq%20%27user%40place.com%27&$top=5

Because of this, results don't come back when they are expected.

per

https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#system-query-options

case sensitive is $filter case insensitive is filter.

Here is the code I am using.

$requestConfiguration = new SignInsRequestBuilderGetRequestConfiguration(); $queryParameters = SignInsRequestBuilderGetRequestConfiguration::createQueryParameters(); $queryParameters->filter = "userPrincipalName eq '".$username."'"; $queryParameters->top = 5; $requestConfiguration->queryParameters = $queryParameters;

If this is by design, how would someone do a case insensitive search? AKA
https://graph.microsoft.com/v1.0/auditLogs/signIns?filter=userPrincipalName%20eq%20%27user%40place.com%27&$top=5

Expected behavior

results to be returned

How to reproduce

mix case on a upn in the https://graph.microsoft.com/v1.0/auditLogs/signIns space

SDK Version

2.11.0

Latest version known to work for scenario above?

No response

Known Workarounds

make sure you match case.

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_
@Teejer Teejer added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Aug 28, 2024
@Ndiritu
Copy link
Contributor

Ndiritu commented Sep 3, 2024

Thank you for this feedback @Teejer.

For a temporary workaround, you can use the withUrl method and pass the full request URL:

$graphServiceClient->auditLogs()->signIns()->withUrl(
    "https://graph.microsoft.com/v1.0/auditLogs/signIns?filter=userPrincipalName%20eq%20%27user%40place.com%27&$top=5"
)->get();

@Ndiritu Ndiritu added type:enhancement Enhancement request targeting an existing experience service bug and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience type:enhancement Enhancement request targeting an existing experience labels Sep 3, 2024
@Teejer
Copy link
Author

Teejer commented Sep 3, 2024

thank you for working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants