Powershell New-CsCallQueue using client id and secret

Anil Kumar 1 Reputation point
2021-03-24T03:49:04.003+00:00

New-CsCallQueue using Connect-MicrosoftTeams ClientID and Client Secret Hello $azureAplicationId ="<appid>" $azureTenantId= "<tenID>" $azurePassword = ConvertTo-SecureString "<appsecret>" -AsPlainText -Force $psCred = New-Object System.Management.Automation.PSCredential($azureAplicationId , $azurePassword) Connect-AzAccount -Credential $psCred -TenantId $azureTenantId -ServicePrincipal $context = [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile.DefaultContext $aadToken = [Microsoft.Azure.Commands.Common.Authentication.AzureSession]::Instance.AuthenticationFactory.Authenticate($context.Account, $context.Environment, $context.Tenant.Id.ToString(), $null, [Microsoft.Azure.Commands.Common.Authentication.ShowDialog]::Never, $null, "https://graph.windows.net").AccessToken Connect-MicrosoftTeams -AadAccessToken $aadToken -AccountId $context.Account.Id -TenantId $context.tenant.id New-CsCallQueue -Name "new call queue help desk" Exception calling "GetSteppablePipeline" with "1" argument(s): "Exception calling "GetRemoteNewCsOnlineSession" with "1" argument(s): "Run either Connect-MicrosoftTeams or new-csonlinesession before running cmdlets."" At C:\Program Files\WindowsPowerShell\Modules\MicrosoftTeams\2.0.0\net472\SfBORemotePowershellModule.psm1:23847 char:13 + $steppablePipeline = $scriptCmd.GetSteppablePipeline($myI ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : CmdletInvocationException Is it possible to create call queue using client id and client Secret?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,518 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,822 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deva-MSFT 2,256 Reputation points Microsoft Employee
    2021-03-25T12:18:28.973+00:00

    I believe you're doing the following:
    1-Run the AAD module for Windows PowerShell as an administrator
    2-Set the execution policy as unrestricted. Set-ExecutionPolicy Restricted
    3 - Now call the above powershell command and see if it helps.

    If you look for info regarding call queue, then you can get it started using here.

    0 comments No comments