Edit

Share via


Remove-EntraUserSponsor

Removes a sponsor from a user.

Syntax

Default (Default)

Remove-EntraUserSponsor

    -UserId <String>
    -SponsorId <String>
    [<CommonParameters>]

Description

The Remove-EntraUserSponsor cmdlet removes a sponsor relationship from a user. Sponsors are users and groups that are responsible for a guest's privileges in the tenant and for keeping the guest's information and access up to date. This cmdlet removes that sponsorship relationship. Specify UserId and SponsorId parameters to remove a user sponsor.

Examples

Example 1: Remove a user sponsor via pipelining

Connect-Entra -Scopes 'User.ReadWrite.All'
Get-EntraUserSponsor -UserId 'SawyerM@contoso.com' | Where-Object { $_.displayName -eq 'Adele Vance (Fabrikam)' } | Remove-EntraUserSponsor

This example demonstrates how to remove a user sponsor.

  • UserId parameter specifies the UserId or User Principal Name of the User.

Example 2: Remove a user sponsor

Connect-Entra -Scopes 'User.ReadWrite.All'
$sponsor = Get-EntraUserSponsor -UserId 'SawyerM@contoso.com' -Top 1
Remove-EntraUserSponsor -UserId 'SawyerM@Contoso.com' -SponsorId $sponsor.Id

This example demonstrates how to remove a user sponsor.

  • UserId parameter specifies the UserId or User Principal Name of the User.
  • SponsorId parameter specifies the ID of the sponsor to remove.

Parameters

-SponsorId

Specifies the ID of the sponsor (user or group) to be removed.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:DirectoryObjectId

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-UserId

Specifies the ID (as a UserPrincipalName or UserId) of a user in Microsoft Entra ID.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ObjectId, UPN, Identity, UserPrincipalName

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.