New-PartnerCustomerApplicationConsent

Creates a new application consent for the specified customer.

Syntax

Default (Default)

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 '00001111-aaaa-2222-bbbb-3333cccc4444' -ApplicationGrants @($grant) -CustomerId '11112222-bbbb-3333-cccc-4444dddd5555' -DisplayName 'CPV Web App'

Creates a new application consent for the specified customer.

Parameters

-ApplicationGrants

The grants for the application.

Parameter properties

Type:

ApplicationGrant[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-ApplicationId

The identifier for application.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-CustomerId

The identifier for the customer.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-DisplayName

The display name for the application.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
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.

Inputs

None

Outputs

Microsoft.Store.PartnerCenter.Models.ApplicationConsents.ApplicationConsent