Connect-PartnerCenter

Connects to Partner Center with an authenticated account for use with cmdlet requests.

Syntax

Connect-PartnerCenter
       -ApplicationId <String>
       [-EnforceMFA]
       [-Environment <EnvironmentName>]
       [-TenantId <String>]
       [<CommonParameters>]
Connect-PartnerCenter
       -AccessToken <String>
       -ApplicationId <String>
       [-Credential <PSCredential>]
       [-EnforceMFA]
       [-Environment <EnvironmentName>]
       [-TenantId <String>]
       [<CommonParameters>]
Connect-PartnerCenter
       [-ApplicationId <String>]
       -Credential <PSCredential>
       [-EnforceMFA]
       [-Environment <EnvironmentName>]
       -TenantId <String>
       [<CommonParameters>]

Description

The Connect-PartnerCenter cmdlet connects to Partner Center with an authenticated account for use with cmdlet requests

Examples

Example 1

PS C:\> Connect-PartnerCenter -ApplicationId '<AppId>'

Connects to Partner Center using the specified application identifier during authentication.

Example 2

PS C:\> $credential = Get-Credential
PS C:\> Connect-PartnerCenter -ApplicationId '<AppId>' -Credential $credential -TenantId '<TenantId>'

Connects to Partner Center using app only authentication. Not all commands support this type of authentication.

Example 3

PS C:\> Connect-PartnerCenter -AccessToken '<AccessToken>' -ApplicationId '<AppId>' -TenantId '<TenantId>'

Connects to Partner Center using an access token.

Parameters

-AccessToken

The access token for Partner Center.

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

-ApplicationId

The identifier of the Azure AD application.

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

-Credential

Credentials that represents the service principal.

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

-EnforceMFA

A flag indicating whether or not multi-factor authentication is enforced. The is only configurable while the Partner Center API is not requiring multi-factor authentication.

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

-Environment

The environment use for authentication.

Type:EnvironmentName
Aliases:EnvironmentName
Accepted values:GlobalCloud, ChinaCloud, GermanCloud, PPE, USGovernment
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TenantId

The identifier of the Azure AD tenant.

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

Inputs

None

Outputs

Microsoft.Store.PartnerCenter.PowerShell.Authentication.PartnerContext