Remove-MgUserAppRoleAssignment

Delete navigation property appRoleAssignments for users

Syntax

Remove-MgUserAppRoleAssignment
      -AppRoleAssignmentId <String>
      -UserId <String>
      [-IfMatch <String>]
      [-PassThru]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-MgUserAppRoleAssignment
      -InputObject <IApplicationsIdentity>
      [-IfMatch <String>]
      [-PassThru]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Delete navigation property appRoleAssignments for users

Examples

Example 1: Remove a user's application role assignment

Remove-MgUserAppRoleAssignment ` 
-AppRoleAssignmentID '01B8ir38J0eoiYqyMt_qAVDX9vgSB6xDur4zn5zOluM' ` 
-UserId '8a7c50d3-fcbd-4727-a889-8ab232dfea01'

This example removes the specified application role from the specified user.

Parameters

-AppRoleAssignmentId

key: id of appRoleAssignment

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-IfMatch

ETag

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Identity Parameter To construct, please use Get-Help -Online and see NOTES section for INPUTOBJECT properties and create a hash table.

Type:IApplicationsIdentity
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False

-PassThru

Returns true when the command succeeds

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-UserId

key: id of user

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Graph.PowerShell.Models.IApplicationsIdentity

Outputs

System.Boolean

Notes

ALIASES

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

INPUTOBJECT <IApplicationsIdentity>: Identity Parameter

  • [AppManagementPolicyId <String>]: key: id of appManagementPolicy
  • [AppRoleAssignmentId <String>]: key: id of appRoleAssignment
  • [ApplicationId <String>]: key: id of application
  • [ApplicationTemplateId <String>]: key: id of applicationTemplate
  • [ClaimsMappingPolicyId <String>]: key: id of claimsMappingPolicy
  • [ConnectorGroupId <String>]: key: id of connectorGroup
  • [ConnectorId <String>]: key: id of connector
  • [DelegatedPermissionClassificationId <String>]: key: id of delegatedPermissionClassification
  • [DirectoryDefinitionId <String>]: key: id of directoryDefinition
  • [DirectoryObjectId <String>]: key: id of directoryObject
  • [EndpointId <String>]: key: id of endpoint
  • [ExtensionPropertyId <String>]: key: id of extensionProperty
  • [FederatedIdentityCredentialId <String>]: key: id of federatedIdentityCredential
  • [GroupId <String>]: key: id of group
  • [HomeRealmDiscoveryPolicyId <String>]: key: id of homeRealmDiscoveryPolicy
  • [LicenseDetailsId <String>]: key: id of licenseDetails
  • [OAuth2PermissionGrantId <String>]: key: id of oAuth2PermissionGrant
  • [OnPremisesAgentGroupId <String>]: key: id of onPremisesAgentGroup
  • [OnPremisesAgentGroupId1 <String>]: key: id of onPremisesAgentGroup
  • [OnPremisesAgentId <String>]: key: id of onPremisesAgent
  • [OnPremisesPublishingProfileId <String>]: key: id of onPremisesPublishingProfile
  • [PublishedResourceId <String>]: key: id of publishedResource
  • [ServicePrincipalId <String>]: key: id of servicePrincipal
  • [SynchronizationJobId <String>]: key: id of synchronizationJob
  • [SynchronizationTemplateId <String>]: key: id of synchronizationTemplate
  • [TokenIssuancePolicyId <String>]: key: id of tokenIssuancePolicy
  • [TokenLifetimePolicyId <String>]: key: id of tokenLifetimePolicy
  • [UserId <String>]: key: id of user