Skip to content

Latest commit

 

History

History
214 lines (163 loc) · 4.8 KB

Connect-PartnerCenter.md

File metadata and controls

214 lines (163 loc) · 4.8 KB
content_git_url external help file Module Name online version original_content_git_url schema
Microsoft.Store.PartnerCenter.PowerShell.dll-Help.xml
PartnerCenter
2.0.0

Connect-PartnerCenter

SYNOPSIS

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

SYNTAX

UserCredential (Default)

Connect-PartnerCenter -ApplicationId <String> [-Credential <PSCredential>] [-Environment <EnvironmentName>]
 [-TokenCache <TokenCache>] [<CommonParameters>]

AccessToken

Connect-PartnerCenter -AccessToken <String> -AccessTokenExpiresOn <DateTimeOffset> -ApplicationId <String>
 [-Environment <EnvironmentName>] -TenantId <String> [-TokenCache <TokenCache>] [<CommonParameters>]

ServicePrincipal

Connect-PartnerCenter -Credential <PSCredential> [-Environment <EnvironmentName>] [-ServicePrincipal]
 -TenantId <String> [-TokenCache <TokenCache>] [<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 '<AppId>'

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.

PARAMETERS

-AccessToken

The access token for Partner Center.

Type: String
Parameter Sets: AccessToken
Aliases:

Required: True
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
Parameter Sets: AccessToken
Aliases:

Required: True
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
Parameter Sets: UserCredential, AccessToken
Aliases:

Required: True
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
Parameter Sets: UserCredential
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: PSCredential
Parameter Sets: ServicePrincipal
Aliases:

Required: True
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
Parameter Sets: (All)
Aliases: EnvironmentName
Accepted values: GlobalCloud, ChinaCloud, GermanCloud, USGovernment

Required: False
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
Parameter Sets: ServicePrincipal
Aliases:

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

-TenantId

The Azure AD domain or tenant identifier.

Type: String
Parameter Sets: AccessToken, ServicePrincipal
Aliases:

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

-TokenCache

The cache used to lookup cached tokens.

Type: TokenCache
Parameter Sets: (All)
Aliases:

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

None

OUTPUTS

Microsoft.Store.PartnerCenter.PowerShell.Profile.PartnerContext

NOTES

RELATED LINKS