Log in to Power BI service with either a user or service principal account (application key or certificate).
For user accounts, an Azure Active Directory (AAD) First-Party application is leveraged for authentication.
To log out call Disconnect-PowerBIServiceAccount.
Przykłady
Example 1
PS C:\> Connect-PowerBIServiceAccount
Logs in using user authentication against the Public cloud, a prompt will display to collect credentials.
Example 2
PS C:\> Connect-PowerBIServiceAccount -Environment China
Logs in using user authentication against the China cloud, a prompt will display to collect credentials.
Logs in using a service principal against the Public cloud, a prompt will display from Get-Credential to enter your username (your AAD client ID) and password (your application secret key).
Logs in using a service principal with an installed certificate to the Public cloud.
The certificate must be installed in either CurrentUser or LocalMachine certificate store (LocalMachine requires administrator access) with a private key installed.
Parametry
-ApplicationId
Azure Active Directory (AAD) application ID (also known as Client ID) to be used with a certificate thumbprint (-CertificateThumbprint) to authenticate with a service principal account (-ServicePrincipal).
Właściwości parametru
Typ:
String
Domyślna wartość:
None
Obsługuje symbole wieloznaczne:
False
DontShow:
False
Zestawy parametrów
ServicePrincipalCertificate
Position:
Named
Obowiązkowy:
True
Wartość z potoku:
False
Wartość z potoku według nazwy właściwości:
False
Wartość z pozostałych argumentów:
False
-CertificateThumbprint
Certificate thumbprint of an installed certificate associated to an Azure Active Directory (AAD) application.
Certificate must be installed in either the CurrentUser or LocalMachine personal certificate stores (LocalMachine requires an administrator prompt to access) with a private key installed.
Właściwości parametru
Typ:
String
Domyślna wartość:
None
Obsługuje symbole wieloznaczne:
False
DontShow:
False
Zestawy parametrów
ServicePrincipalCertificate
Position:
Named
Obowiązkowy:
True
Wartość z potoku:
False
Wartość z potoku według nazwy właściwości:
False
Wartość z pozostałych argumentów:
False
-Credential
PSCredential representing the Azure Active Directory (AAD) application client ID (username) and application secret key (password) to authenticate with a service principal account (-ServicePrincipal).
Właściwości parametru
Typ:
PSCredential
Domyślna wartość:
None
Obsługuje symbole wieloznaczne:
False
DontShow:
False
Zestawy parametrów
ServicePrincipal
Position:
Named
Obowiązkowy:
True
Wartość z potoku:
False
Wartość z potoku według nazwy właściwości:
False
Wartość z pozostałych argumentów:
False
UserAndCredential
Position:
Named
Obowiązkowy:
True
Wartość z potoku:
False
Wartość z potoku według nazwy właściwości:
False
Wartość z pozostałych argumentów:
False
-CustomEnvironment
The custom environment to use for the environments returned from the discovery url.
Właściwości parametru
Typ:
String
Domyślna wartość:
None
Obsługuje symbole wieloznaczne:
False
DontShow:
False
Zestawy parametrów
(All)
Position:
Named
Obowiązkowy:
False
Wartość z potoku:
False
Wartość z potoku według nazwy właściwości:
False
Wartość z pozostałych argumentów:
False
-DiscoveryUrl
The discovery url to get the backend services info from. Custom environment must also be supplied.
Właściwości parametru
Typ:
String
Domyślna wartość:
None
Obsługuje symbole wieloznaczne:
False
DontShow:
False
Zestawy parametrów
(All)
Position:
Named
Obowiązkowy:
False
Wartość z potoku:
False
Wartość z potoku według nazwy właściwości:
False
Wartość z pozostałych argumentów:
False
-Environment
Cloud environment to connect against. Default is Public.
Indicates to use a service principal account, as opposed to a user account.
Właściwości parametru
Typ:
SwitchParameter
Domyślna wartość:
None
Obsługuje symbole wieloznaczne:
False
DontShow:
False
Zestawy parametrów
ServicePrincipal
Position:
Named
Obowiązkowy:
True
Wartość z potoku:
False
Wartość z potoku według nazwy właściwości:
False
Wartość z pozostałych argumentów:
False
ServicePrincipalCertificate
Position:
Named
Obowiązkowy:
True
Wartość z potoku:
False
Wartość z potoku według nazwy właściwości:
False
Wartość z pozostałych argumentów:
False
-Tenant
Tenant name or tenant ID containing the service principal account. If not specified, the 'COMMON' tenant is used.
Właściwości parametru
Typ:
String
Domyślna wartość:
None
Obsługuje symbole wieloznaczne:
False
DontShow:
False
Aliasy:
TenantId
Zestawy parametrów
ServicePrincipal
Position:
Named
Obowiązkowy:
False
Wartość z potoku:
False
Wartość z potoku według nazwy właściwości:
False
Wartość z pozostałych argumentów:
False
ServicePrincipalCertificate
Position:
Named
Obowiązkowy:
False
Wartość z potoku:
False
Wartość z potoku według nazwy właściwości:
False
Wartość z pozostałych argumentów:
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.