Get-ServicePrincipal [[-Identity] <ServicePrincipalIdParameter>] [-Organization <OrganizationIdParameter>] [<CommonParameters>] 说明 Azure Active Directory 中存在服务主体,用于定义应用可以执行哪些操作、谁可以访问应用以及应用可以访问哪些资源。 在Exchange Online中,服务主体是对 Azure AD 中服务主体的引用。
PowerShell使用ServicePrincipal登陆Azure 一、打开PowerShell 二、输入下列命令 $pass = ConvertTo-SecureString"<这里换成您的AAD应用密钥>"-AsPlainText –Force $cred= New-Object -TypeName pscredential –ArgumentList"<这里换成您的AAD应用ID>", $pass Login-AzureRmAccount -Environment AzureChinaCloud -Creden...
Get-MgServicePrincipalOwner -ServicePrincipalId $EnterpriseApp.Id $Username = $Owner.AdditionalProperties.userPrincipalName -join ';' $OwnerID = $Owner.Id -join ';' if ($null -eq $Owner.AdditionalProperties.userPrincipalName) { $Username = @( $Owner.AdditionalProperties....
通过提供ServicePrincipalId、ClientId和TenantId的正确值来运行以下命令。 PowerShell $ClientCertificate=Get-ChildItem-Pathcert:\CurrentUser\my\ |Where-Object{$_.Subject-eq"CN=CSV2SCIM"}$ThumbPrint=$ClientCertificate.ThumbPrint .\CSV2SCIM.ps1-Path'..\Samples\csv-with-2-records.csv'-AttributeMapping$...
$servicePrincipalName="SAP Cloud Identity Services"$servicePrincipalRoleName="User" 查找应用程序服务主体的 ID。 PowerShell $servicePrincipalFilter="displayName eq '"+$applicationName+"'"$servicePrincipal=Get-MgServicePrincipal-Filter$servicePrincipalFilter-allif($servicePrincipal-eq$null) {throw"service...
The service principal can be configured as an Azure PowerShell account as follows:$tenantId = Get-AzureSubscription | ` Where {$_.IsCurrent -eq "True"} | ` Select TenantId$appPrincipalId = (Get-MsolServicePrincipal -ServicePrincipalName $servicePrincipalName).AppPrincipal...
The App parameter specifies the service principal to assign the management role to. Specifically, the ObjectId GUID value from the output of the Get-ServicePrincipal cmdlet (for example, 6233fba6-0198-4277-892f-9275bf728bcc). For more information about service principals, seeApplication and serv...
若要连接到安全性和符合性 PowerShell 以 Microsoft 365 全球以外的云,请参阅连接到安全性和符合性 PowerShell。 运行以下命令以连接到 Teams PowerShell。 PowerShell Import-ModuleMicrosoftTeams$credential=Get-CredentialConnect-MicrosoftTeams-Credential$credential ...
Import-ModuleActiveDirectory$UserID="Al1ex"Get-ADUser$UserID–property* 在PowerShell v3版本以及高版本,无需运行第一行命令,因为PowerShell将识别必要的模块和自动加载它,而且一旦加载了Active Directory PowerShell模块,就可以像浏览文件系统那样浏览AD,例如: ...
This replaces an earlier post which I am leaving up since it provides information on using the AAD PowerShell cmdlets to get additional information about service principals. There is a more extensive description of this topic on the Azure.com website....