Skip to content

Update-MGUser -agegroup doesn't allow null value despite documentation #2609

@skellyatsnhu

Description

@skellyatsnhu

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
The Update-MgUser documentation states that -AgeGroup accepts null as one of its values. In practice, it does not, erroring out. What does work is adult, minor, and notadult.

Describe alternatives you've considered
update-mguser -userid "somebody@domain.com" -agegroup null
update-mguser -userid "somebody@domain.com" -agegroup "null"
update-mguser -userid "somebody@domain.com" -agegroup $null

Invoke-GraphRequest -Method PATCH -Uri "https://graph.microsoft.com/v1.0/Users/$($myupn)" -Body '{"AgeGroup": []}'
^This also fails with effectively the same error.

Additional context
n/a

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions