Connect-PartnerCenter

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

Syntax

Connect-PartnerCenter
       -ApplicationId <String>
       [-Credential <PSCredential>]
       [-Environment <EnvironmentName>]
       [<CommonParameters>]
Connect-PartnerCenter
       -AccessToken <String>
       -AccessTokenExpiresOn <DateTimeOffset>
       -ApplicationId <String>
       [-Environment <EnvironmentName>]
       -TenantId <String>
       [<CommonParameters>]
Connect-PartnerCenter
       -Credential <PSCredential>
       [-Environment <EnvironmentName>]
       [-ServicePrincipal]
       -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>'

Connect 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

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

Example 3

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

Connects to Partner Center using app only authentication. When prompted for credential specify the application identifier for the username and the application secret for the password.

Required Parameters

-AccessToken

The access token for Partner Center.

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

The date and time when the token for Partner Center expires.

Type:DateTimeOffset
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ApplicationId

The application identifier used to access the Partner Center API.

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

User credentials to be used when connecting to Partner Center.

Type:PSCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServicePrincipal

A flag indiicating that a service principal will be used to authenticate.

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

The Azure AD domain or tenant identifier.

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

Optional Parameters

-Credential

User credentials to be used when connecting to Partner Center.

Type:PSCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Environment

Name of the environment containing the account to log into

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

Inputs

None

Outputs

Microsoft.Store.PartnerCenter.PowerShell.Profile.PartnerContext