Update-MgOauth2PermissionGrant

Update entity in oauth2PermissionGrants

Syntax

Update-MgOauth2PermissionGrant
      -OAuth2PermissionGrantId <String>
      [-AdditionalProperties <Hashtable>]
      [-ClientId <String>]
      [-ConsentType <String>]
      [-ExpiryTime <DateTime>]
      [-Id <String>]
      [-PrincipalId <String>]
      [-ResourceId <String>]
      [-Scope <String>]
      [-StartTime <DateTime>]
      [-PassThru]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-MgOauth2PermissionGrant
      -OAuth2PermissionGrantId <String>
      -BodyParameter <IMicrosoftGraphOAuth2PermissionGrant>
      [-PassThru]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-MgOauth2PermissionGrant
      -InputObject <IIdentitySignInsIdentity>
      [-AdditionalProperties <Hashtable>]
      [-ClientId <String>]
      [-ConsentType <String>]
      [-ExpiryTime <DateTime>]
      [-Id <String>]
      [-PrincipalId <String>]
      [-ResourceId <String>]
      [-Scope <String>]
      [-StartTime <DateTime>]
      [-PassThru]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-MgOauth2PermissionGrant
      -InputObject <IIdentitySignInsIdentity>
      -BodyParameter <IMicrosoftGraphOAuth2PermissionGrant>
      [-PassThru]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Update entity in oauth2PermissionGrants

Parameters

-AdditionalProperties

Additional Parameters

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-BodyParameter

oAuth2PermissionGrant To construct, see NOTES section for BODYPARAMETER properties and create a hash table.

Type:IMicrosoftGraphOAuth2PermissionGrant
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-ClientId

The id of the client service principal for the application which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only).

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
-ConsentType

Indicates whether authorization is granted for the client application to impersonate all users or only a specific user. AllPrincipals indicates authorization to impersonate all users. Principal indicates authorization to impersonate a specific user. Consent on behalf of all users can be granted by an administrator. Non-admin users may be authorized to consent on behalf of themselves in some cases, for some delegated permissions. Required. Supports $filter (eq only).

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

Currently, the end time value is ignored, but a value is required when creating an oAuth2PermissionGrant. Required.

Type:DateTime
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Id

Read-only.

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

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:IIdentitySignInsIdentity
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-OAuth2PermissionGrantId

key: id of oAuth2PermissionGrant

Type:String
Position:Named
Default value:None
Accept pipeline input:False
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
-PrincipalId

The id of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal. If consentType is AllPrincipals this value is null. Required when consentType is Principal.

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

The id of the resource service principal to which access is authorized. This identifies the API which the client is authorized to attempt to call on behalf of a signed-in user.

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

A space-separated list of the claim values for delegated permissions which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the publishedPermissionScopes property of the resource service principal.

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

Currently, the start time value is ignored, but a value is required when creating an oAuth2PermissionGrant. Required.

Type:DateTime
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.IIdentitySignInsIdentity

Microsoft.Graph.PowerShell.Models.IMicrosoftGraphOAuth2PermissionGrant

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.

BODYPARAMETER : oAuth2PermissionGrant

  • [(Any) <Object>]: This indicates any property can be added to this object.
  • [Id <String>]: Read-only.
  • [ClientId <String>]: The id of the client service principal for the application which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only).
  • [ConsentType <String>]: Indicates whether authorization is granted for the client application to impersonate all users or only a specific user. AllPrincipals indicates authorization to impersonate all users. Principal indicates authorization to impersonate a specific user. Consent on behalf of all users can be granted by an administrator. Non-admin users may be authorized to consent on behalf of themselves in some cases, for some delegated permissions. Required. Supports $filter (eq only).
  • [ExpiryTime <DateTime?>]: Currently, the end time value is ignored, but a value is required when creating an oAuth2PermissionGrant. Required.
  • [PrincipalId <String>]: The id of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal. If consentType is AllPrincipals this value is null. Required when consentType is Principal.
  • [ResourceId <String>]: The id of the resource service principal to which access is authorized. This identifies the API which the client is authorized to attempt to call on behalf of a signed-in user.
  • [Scope <String>]: A space-separated list of the claim values for delegated permissions which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the publishedPermissionScopes property of the resource service principal.
  • [StartTime <DateTime?>]: Currently, the start time value is ignored, but a value is required when creating an oAuth2PermissionGrant. Required.

INPUTOBJECT : Identity Parameter

  • [ActivityBasedTimeoutPolicyId <String>]: key: id of activityBasedTimeoutPolicy
  • [AuthenticationContextClassReferenceId <String>]: key: id of authenticationContextClassReference
  • [AuthenticationMethodId <String>]: key: id of authenticationMethod
  • [AuthorizationPolicyId <String>]: key: id of authorizationPolicy
  • [BitlockerRecoveryKeyId <String>]: key: id of bitlockerRecoveryKey
  • [ClaimsMappingPolicyId <String>]: key: id of claimsMappingPolicy
  • [ConditionalAccessPolicyId <String>]: key: id of conditionalAccessPolicy
  • [DataLossPreventionPolicyId <String>]: key: id of dataLossPreventionPolicy
  • [DataPolicyOperationId <String>]: key: id of dataPolicyOperation
  • [DirectoryObjectId <String>]: key: id of directoryObject
  • [EmailAuthenticationMethodId <String>]: key: id of emailAuthenticationMethod
  • [FeatureRolloutPolicyId <String>]: key: id of featureRolloutPolicy
  • [Fido2AuthenticationMethodId <String>]: key: id of fido2AuthenticationMethod
  • [HomeRealmDiscoveryPolicyId <String>]: key: id of homeRealmDiscoveryPolicy
  • [IdentityProviderId <String>]: key: id of identityProvider
  • [IdentityUserFlowId <String>]: key: id of identityUserFlow
  • [InformationProtectionLabelId <String>]: key: id of informationProtectionLabel
  • [LongRunningOperationId <String>]: key: id of longRunningOperation
  • [MicrosoftAuthenticatorAuthenticationMethodId <String>]: key: id of microsoftAuthenticatorAuthenticationMethod
  • [NamedLocationId <String>]: key: id of namedLocation
  • [OAuth2PermissionGrantId <String>]: key: id of oAuth2PermissionGrant
  • [OrganizationId <String>]: key: id of organization
  • [PasswordAuthenticationMethodId <String>]: key: id of passwordAuthenticationMethod
  • [PasswordlessMicrosoftAuthenticatorAuthenticationMethodId <String>]: key: id of passwordlessMicrosoftAuthenticatorAuthenticationMethod
  • [PermissionGrantConditionSetId <String>]: key: id of permissionGrantConditionSet
  • [PermissionGrantPolicyId <String>]: key: id of permissionGrantPolicy
  • [PhoneAuthenticationMethodId <String>]: key: id of phoneAuthenticationMethod
  • [RiskDetectionId <String>]: key: id of riskDetection
  • [RiskyUserHistoryItemId <String>]: key: id of riskyUserHistoryItem
  • [RiskyUserId <String>]: key: id of riskyUser
  • [SensitivityLabelId <String>]: key: id of sensitivityLabel
  • [SensitivityLabelId1 <String>]: key: id of sensitivityLabel
  • [TemporaryAccessPassAuthenticationMethodId <String>]: key: id of temporaryAccessPassAuthenticationMethod
  • [ThreatAssessmentRequestId <String>]: key: id of threatAssessmentRequest
  • [ThreatAssessmentResultId <String>]: key: id of threatAssessmentResult
  • [TokenIssuancePolicyId <String>]: key: id of tokenIssuancePolicy
  • [TokenLifetimePolicyId <String>]: key: id of tokenLifetimePolicy
  • [TrustFrameworkKeySetId <String>]: key: id of trustFrameworkKeySet
  • [TrustFrameworkPolicyId <String>]: key: id of trustFrameworkPolicy
  • [UnifiedRoleManagementPolicyAssignmentId <String>]: key: id of unifiedRoleManagementPolicyAssignment
  • [UnifiedRoleManagementPolicyId <String>]: key: id of unifiedRoleManagementPolicy
  • [UnifiedRoleManagementPolicyRuleId <String>]: key: id of unifiedRoleManagementPolicyRule
  • [UserId <String>]: key: id of user
  • [WindowsHelloForBusinessAuthenticationMethodId <String>]: key: id of windowsHelloForBusinessAuthenticationMethod