microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

Unable to extract AdministrativeUnit member: "Invalid property 'businessPhones' specified in $select

Open
#3,154 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status:waiting-for-triage type:bug
Dominant language
C#
Stars
789
Forks
264
Avg merge
15h 17m
Merged PRs (30d)
3

Description

Describe the bug

I'm trying to verify that users I'm creating join an administrative unit with dynamic membership rules. Instead of querying the members, I figure I can just try to extract the given member. The documentation does not give any C# samples, but I found that I can address the administrativeUnit membership using

graphServiceClient.Directory.AdministrativeUnits[unitId].Members[memberId]

However, there's no GetAsync() operation on this. It seems, you need to specify what kind of member type you're looking for - so for a user, it is

graphServiceClient.Directory.AdministrativeUnits[unitId].Members[memberId].GraphUser.GetAsync() .

So when I'm trying this, I'm getting an exception with message

Invalid property 'businessPhones' specified in $select.

However, I'm not making any selects, so it seems the SDK is injecting something.

Expected behavior

await graphServiceClient.Directory.AdministrativeUnits[unitId].Members[memberId].GraphUser.GetAsync()` should return the User in case it's there, or an exception Resource_not_Found if memberId is not a member of the Administrative Unit.

How to reproduce

For an existing Administrative Unit with id unitIdand a user that is a member with id memberId call

await graphServiceClient.Directory.AdministrativeUnits[unitId].Members[memberId].GraphUser.GetAsync()`

SDK Version

6.2.0

Latest version known to work for scenario above?

No response

Known Workarounds

Searching the AdministrativeUnit membership using the list operation.

Debug output
Click to expand log ```
</details>


### Configuration

-OS:  Win11 25H2, x64

### 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 graphServiceClient.Directory.AdministrativeUnits[unitId].Members[memberId].GraphUser.GetAsync() using SDK 6.2.0, and compare its request with the administrative unit list-members operation documented for C#. Trace why businessPhones is included in $select even though the caller specifies no select. Done means retrieving an existing member succeeds without that invalid property error and a missing member produces the expected not-found result.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.