microsoftgraph / microsoftgraph/msgraph-sdk-php

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

Open
#1,571 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

service bug
Dominant language
PHP
Stars
669
Forks
150
Avg merge
15h 21m
Merged PRs (30d)
3

Description

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_

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.

Research direction

Start with SignInsRequestBuilderGetRequestConfiguration and the request example in the issue, then compare the generated query with the linked OData system-query-options documentation. Verify whether the casing difference originates in the PHP SDK or Microsoft Graph; done means the mixed-case sign-in lookup behavior is corrected or clearly documented with a supported workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.