question

saipranav avatar image
0 Votes"
saipranav asked Deva-MSFT answered

Powershell New-CsCallQueue using client id and secret

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?

office-teams-app-devmicrosoft-graph-teamwork
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Deva-MSFT avatar image
0 Votes"
Deva-MSFT answered

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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.