Skip to content

No cmdlets to add/remove a user's sponsors #3534

Description

Describe the bug

There are no cmdlets to add/remove a user's sponsors.
The Graph API documentation also lists no pwsh examples: https://learn.microsoft.com/en-us/graph/api/user-post-sponsors?view=graph-rest-1.0&tabs=http

Expected behavior

Cmdlet Get-MgUserSponsor exists and is working as expected, however I'm missing the cmdlets to add/remove them.
They should be called:

  • New-MgUserSponsor / Add-MgUserSponsor
  • Remove-MgUserSponsor

How to reproduce

Run

Get-Command -Noun *sponsor* -Module Microsoft.Graph.Users
Get-Command -Noun *sponsor* -Module Microsoft.Graph.Beta.Users

and see that only the Get-cmdlet is returned.

SDK Version

2.35.1

Latest version known to work for scenario above?

No response

Known Workarounds

As a workaround you can use the REST-API directly or invoke it via Invoke-GraphRequest

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Activity

  1. ramsessanchez commented on Feb 23, 2026

    @ramsessanchez
    Contributor

    Florian Kolb (@Skaldhor) It is possible these API end points haven't reached our metadata yet, even if they have been published to graph. In the case they have made it to our metadata, then they should be available by next version bump.

  2. gavinbarron commented on Feb 24, 2026

    @gavinbarron
    Member

    Ramses Sanchez-Hernandez (@ramsessanchez) the remove documentation here: https://learn.microsoft.com/en-us/graph/api/user-delete-sponsors?view=graph-rest-1.0&tabs=http shows the HTTP request DELETE /users/{id}/sponsors/{id}/$ref

    $ref collection behavior is generally added via the XOD so that hidi gets the right signals to treat that users' sponsors collection as a reference collection. See here: https://github.com/microsoftgraph/msgraph-metadata/blob/c80fe20366f325c8fd01c7ec232cbbfa1cd1b42d/transforms/csdl/preprocess_csdl.xsl#L2555

    This likely needs manual intervention to have these appear.

  3. Skaldhor commented on Aug 17, 2026

    @Skaldhor
    Author

    Gavin Barron (@gavinbarron) Ramses Sanchez-Hernandez (@ramsessanchez) please reopen this issue. There are still no Cmdlets to manage the sponsors.
    Documentation at https://learn.microsoft.com/en-us/graph/api/user-post-sponsors?view=graph-rest-1.0&tabs=powershell#example-1-assign-a-user-as-a-sponsor also lists Cmdlet New-MgUserSponsorByRef which doesn't even exist.
    Same with Cmdlet Remove-MgUserSponsorDirectoryObjectByRef in doc https://learn.microsoft.com/en-us/graph/api/user-delete-sponsors?view=graph-rest-1.0&tabs=powershell#request
    Please fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions