New-PartnerCustomerApplicationConsent

Creates a new application consent for the specified customer.

Syntax

New-PartnerCustomerApplicationConsent
   -ApplicationGrants <ApplicationGrant[]>
   -ApplicationId <String>
   -CustomerId <String>
   -DisplayName <String>
   [<CommonParameters>]

Description

This cmdlet creates a new application consent for the specified customer.

Examples

Example 1

PS C:\> $grant = New-Object -TypeName Microsoft.Store.PartnerCenter.Models.ApplicationConsents.ApplicationGrant
PS C:\> $grant.EnterpriseApplicationId = '00000002-0000-0000-c000-000000000000'
PS C:\> $grant.Scope = "Domain.ReadWrite.All,User.ReadWrite.All,Directory.Read.All"
PS C:\> New-PartnerCustomerApplicationConsent -ApplicationId 'c33c2273-9329-42ec-948d-152ead47cf65' -ApplicationGrants @($grant) -CustomerId 'f1c5e45f-7dea-4863-a55d-b5a5479201df' -DisplayName 'CPV Web App'

Creates a new application consent for the specified customer.

Parameters

-ApplicationGrants

The grants for the application.

Type:ApplicationGrant[]
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ApplicationId

The identifier for application.

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

-CustomerId

The identifier for the customer.

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

-DisplayName

The display name for the application.

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

Inputs

None

Outputs

Microsoft.Store.PartnerCenter.Models.ApplicationConsents.ApplicationConsent