You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect error when querying AdministrativeUnit membership #3156
My application needs to verify that a created user has joined an administrative unit with dynamic membership rules. Since querying the member directly hits another bug I'm making a query on the membership collection instead with filter
I'm making that request immediately after creating the user, so the dynamic membership hasn't been applied yet. So, I'm expecting an empty result. Instead I'm getting an exception:
Request_ResourceNotFound - Resource '510f02dc-ce75-49dc-a964-7259341d973d' does not exist or one of its queried reference-property objects are not present
There's but one problem... the Resource mentioned that's my administrative unit, not the memberId I'm looking for. Thus, the error is wrong. It should say 'Resource 'id'' does not exist or one of its queried reference-property objects are not present'
If I wait for a minute and run the same code again, it returns success and returns the member - so I know what I'm querying is correct.
Expected behavior
The error should say that the Resource 'id' (with the ID I'm querying) is not present, not the Id of the Admin Unit (which most definitely IS present)
How to reproduce
Create an admin unit with dynamic membership, and create a rule on the UPN. Then create a user with a UPN matching the rule you created.
Immediately after creating the new user, run the query as described above on the AdminUnit.. you'll get the error.
SDK Version
6.2.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```
</details>
### Configuration
Win 11 Pro x64
.NET SDK 10.0.302
### Other information
_No response_
Martin Machacek (@MartinM85) : Have you tested this? I just ran the code again, this time with count and eventual consistency header, but still getting the same erroneous behavior.
Activity
MartinM85 commentedon Jul 29, 2026
The query will work if you add
ConsistencyLevel:eventualheader and$countparameterssteiner commentedon Aug 11, 2026
Martin Machacek (@MartinM85) : Have you tested this? I just ran the code again, this time with count and eventual consistency header, but still getting the same erroneous behavior.