[英]Connect with teams from an Azure Automation with “run as” account
我想從 Azure 自動化分配團隊策略。 為此,我使用當前版本中的 PowerShell 模塊“MicrosoftTeams”。
當我使用用戶憑據登錄 Teams 時,如下所示,分配工作。
$Cred = Get-AutomationPSCredential -Name 'Teams-Admin'
Connect-MicrosoftTeams -TenantId $tenantId -Credential $Cred
# Grant policys
Grant-CsUserPolicyPackage -Identity $mailAddress -PackageName Test
但是我想用Run-As賬號登錄,如下圖。 當我這樣做時,我收到一個錯誤。
$connection = Get-AutomationConnection –Name AzureRunAsConnection
Connect-MicrosoftTeams -TenantId $connection.TenantID `
-ApplicationId $connection.ApplicationID `
-CertificateThumbprint $connection.CertificateThumbprint
# Grant policys
Grant-CsUserPolicyPackage -Identity $mailAddress -PackageName Test
錯誤如下:
Grant-CsUserPolicyPackage:Powershell 管理的域意外為空/空
“Run-As”帳戶的應用注冊表具有 Teams 管理員和 Skype for Business 管理員角色。 此外,我已將 API 權限中的“AppCatalog.ReadWrite.All”、“Group.ReadWrite.All”、“User.Read.All”權限委派給 Microsoft Graph,並將“user_impersonation”權限委派給 Skype 和 Teams Tenant Admin API。
當前不支持服務主體名稱。 我們有這方面的積壓項目,但沒有可共享的預計到達時間。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.