Skip to content

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

Description

@ssteiner

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_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions