Giter VIP home page Giter VIP logo

microsoft-teams-apps-call-queue-scheduler's Introduction

Microsoft Teams Call Queue Scheduler

Solution overview Deployment guide Configuration guide FAQ Support

This application allows a delegated administrator to manage the active agents for a Microsoft Teams Call Queue in real-time and/or through a defined shift schedule.

Microsoft Teams Call Queue Scheduler screenshot(https://youtu.be/KQBKjXQ8_mY)

About this application

The Teams Admin Center (TAC) and PowerShell are the two admin interfaces to manage Call Queues. While both allow for an admin to full managability a Call Queue, this application has been developed to fill the following gaps:

  • ability to delegate administration of the the agents for a given Call Queue.
  • scheduling agents in the Call Queue for specific shifts in the future.

This application provides the following capability:

  • Call Queue
    • Select a delegated Call Queue and view the list of named agents that are currently active.
    • Make real-time changes to the list of named agents defined in a Call Queue by a delegated administrator.
    • Schedule agents in shifts to allow for the automation of named agents in the Call Queue by a delegated administrator.
      • Schedule agents in advance by uploading a CSV file.
      • Modify an existing shift schedule
        • add an agent to the existing schedule
        • remove an agent from the existing schedule
        • modify the shift of a scheduled agent.

This application works by manipulating the list of named agents in a Call Queue. This application does NOT support agents defined as part of a group or a Team channel. Since this application leverages named agents, the number of agents that can be active in the queue at the same time is limited to 20. The number of agents that could be potentially added to the queue can be much greater.

The people picker presented in the app shows all the users in your organization. Due to our API limitation we cannot filter the users to show only those with enterprise voice enabled. Adding agents will be successful only if the selecter user(s) are enterprise voice enabled. You will not see any error thrown if the user is not enterprise voice enabled and you attempt to add them as an agent.

See Step 3: Set up who will answer incoming calls here for detail on the different ways agents can be defined to answer calls.

Note: This is a sample application. It does not have robust error handling to accomodate all exceptions. This includes error handling to account for the case where the 21st or greater agent is added to the queue, or to handle situations involving groups or Teams channels.

The architecture of this solution can be adapted to support other scenarios that require delegated admin management of Teams phone system or any other feature accessible via PowerShell cmdlet or even MS Graph API.

Here is the application running in Microsoft Teams

Microsoft Teams Call Queue Scheduler screenshot

If you want to start using the solution yourself review the Wiki for the deployment and configuration steps.

Cost Estimates

This is a costs estimates based on the public pricelist of January 2023. They do not include the costs for Office 365 & Microsoft Teams.

All prices are provided for information only.

Service Estimated usage Unit price Estimated cost / month
Power Platform 20 admins (Premium connector) $5 per user/app/month $100
Azure App Service plan EP1 SKU (1 core, 3.5GB RAM, 250GB storage) $49.98 per instance/month $50
Azure (other services) storage and keyvault request based on capacity (GB) & # requests <$1
Total estimated $150

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Legal Notice

This app template is provided under the MIT License terms.  In addition to these terms, by using this app template you agree to the following:

  • You, not Microsoft, will license the use of your app to users or organization.
  • This app template is not intended to substitute your own regulatory due diligence or make you or your app compliant with respect to any applicable regulations, including but not limited to privacy, healthcare, employment, or financial regulations.
  • You are responsible for complying with all applicable privacy and security regulations including those related to use, collection and handling of any personal data by your app.  This includes complying with all internal privacy and security policies of your organization if your app is developed to be sideloaded internally within your organization. Where applicable, you may be responsible for data related incidents or data subject requests for data collected through your app.
  • Any trademarks or registered trademarks of Microsoft in the United States and/or other countries and logos included in this repository are the property of Microsoft, and the license for this project does not grant you rights to use any Microsoft names, logos or trademarks outside of this repository.  Microsoft’s general trademark guidelines can be found here.
  • Use of this template does not guarantee acceptance of your app to the Teams app store.  To make this app available in the Teams app store, you will have to comply with the submission and validation process, and all associated requirements such as including your own privacy statement and terms of use for your app.

microsoft-teams-apps-call-queue-scheduler's People

Contributors

microsoft-github-operations[bot] avatar microsoftopensource avatar rishire avatar svarukala avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

microsoft-teams-apps-call-queue-scheduler's Issues

"MS Teams Call Queues" list blank in app

Finally got everything installed and deployed. The Test Call Queue from step 16 in the Deployment guide was successful and listed all my call queues. However, when running the App in PowerApps, none of my call queues are listed. Users can be searched. Any suggestions?

image

Deploy-SPO not working.

When running the script, it asks me to sign in to the tenant. When it completes the script just waits. No errors or further messages.

I'm having issues getting this deployed. ListCallQueues is blank and throwing an errror

Discussed in #5

Originally posted by nonekdan September 27, 2023
Hi Guys,
First off I want to say thank you and to say that I am looking forward to getting this running!
Initially I had an error in deploying this and it was
414 | Connect-MgGraph -AccessToken $token.Token #Connect-MgGraph -DeviceCod …
| ~~~~~~~~~~~~
| Cannot bind parameter 'AccessToken'. Cannot convert the
| "eyJ0eXAiOiJKV1QiLCJub25jZSI6IlNVdVNhT3FVeHVwYUVDbi1HYjdRRERmM3ljU2ZUTE5KNk11VWhJbnZ6YXciLCJhbGciOiJSUzI1NiIsIng1dCI6Ii1LSTNROW5OUjdiUm9meG1lWm9YcWJIWkdldyIsImtpZCI6Ii1LSTNROW5OUjdiUm9meG1lWm9YcWJIWkdldyJ9.eyJhdWQiOiJodHRwczovL2dyYXBoLm1pY3Jvc29mdC5jb20iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC85ZmM5OTk1OC1k
I was able to resolve this one by modifying the deploy.ps1 like this.
Replaced line 414 with
Connect-MgGraph -AccessToken ($token.Token |ConvertTo-SecureString -AsPlainText -Force)
This allowed it to deploy.
Now I'm getting another authentication issue that MIGHT be related, but the error is different.
I'm monitoring the ListCallQueues process and it's throwing a lot of red but the gist of it looks like it thinks it has a wrong username and password. Now I'm assuming that it's binding by using the service account I created? I also gave it an E5 license on the off chance that was it and I also made sure it was excluded in my MFA policy, but I can't figure this out.
Any help would be greatly appreciated!
Here is some of the output from the logs.
Connected!
2023-09-27T08:59:44Z [Information] Executing 'Functions.ListCallQueues' (Reason='This function was programmatically called via the host APIs.', Id=04aec9ff-d1d0-44e3-823c-bba9503abf0d)
2023-09-27T09:00:10Z [Information] OUTPUT: PS Result>
2023-09-27T09:00:10Z [Information] Executed 'Functions.ListCallQueues' (Succeeded, Id=04aec9ff-d1d0-44e3-823c-bba9503abf0d, Duration=25990ms)
2023-09-27T09:00:11Z [Error] ERROR: Session is not established, run Connect-MicrosoftTeams before requesting access token

Exception :
Type : System.UnauthorizedAccessException
TargetSite :
Name : GetAccessToken
DeclaringType : Microsoft.Teams.ConfigApi.Cmdlets.CmdletHostWrapper, Microsoft.Teams.ConfigAPI.Cmdlets.private, Version=5.728.1.0, Culture=neutral, PublicKeyToken=null
MemberType : Method
Module : Microsoft.Teams.ConfigAPI.Cmdlets.private.dll
Message : Session is not established, run Connect-MicrosoftTeams before requesting access token
Source : Microsoft.Teams.ConfigAPI.Cmdlets.private
HResult : -2147024891
StackTrace :
at Microsoft.Teams.ConfigApi.Cmdlets.CmdletHostWrapper.GetAccessToken(String appId, String scope)
at Microsoft.Teams.ConfigApi.Cmdlets.SessionStateStore.Microsoft.Teams.ConfigApi.Cmdlets.ISessionStateStore.GetSessionState()
at Microsoft.Teams.ConfigApi.Cmdlets.SessionStateStore.get_ConfigApiSessionInfo()
at Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Module.SendAsync(InvocationInfo invocationInfo, HttpRequestMessage request, IEventListener callback, ISendAsync next)
at Microsoft.Teams.ConfigAPI.Cmdlets.Generated.ConfigApiBasedCmdlets.CallQueueGet_Call(HttpRequestMessage request, Func3 onOk, IEventListener eventListener, ISendAsync sender) at Microsoft.Teams.ConfigAPI.Cmdlets.Generated.ConfigApiBasedCmdlets.CallQueueGet_Call(HttpRequestMessage request, Func3 onOk, IEventListener eventListener, ISendAsync sender)
at Microsoft.Teams.ConfigAPI.Cmdlets.Generated.ConfigApiBasedCmdlets.CallQueueGet(Nullable1 first, Nullable1 skip, Nullable1 excludeContent, String nameFilter, String typeFilter, String sortBy, Nullable1 descending, Nullable1 filterInvalidObos, Func3 onOk, IEventListener eventListener, ISendAsync sender)
at Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Cmdlets.GetCsCallQueue_Get.ProcessRecordAsync()
at Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Cmdlets.GetCsCallQueue_Get.ProcessRecordAsync()
CategoryInfo : NotSpecified: (:) [Get-CsCallQueue_Get], UnauthorizedAccessException
FullyQualifiedErrorId : Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Cmdlets.GetCsCallQueue_Get
InvocationInfo :
MyCommand : Get-CsCallQueue_Get
ScriptLineNumber : 3412
OffsetInLine : 9
HistoryId : 1
ScriptName : C:\home\data\ManagedDependencies\2309270734360645583.r\MicrosoftTeams\4.6.0\custom\Merged_custom_PsExt.ps1
Line : $result = Microsoft.Teams.ConfigAPI.Cmdlets.internal\Get-CsCallQueue @PSBoundParameters

Getting an Error at the ListCallQueues portion of the verification. Please help!

Hi Guys,
First off I want to say thank you and to say that I am looking forward to getting this running!
Initially I had an error in deploying this and it was
414 | Connect-MgGraph -AccessToken $token.Token #Connect-MgGraph -DeviceCod …
| ~~~~~~~~~~~~
| Cannot bind parameter 'AccessToken'. Cannot convert the
| "eyJ0eXAiOiJKV1QiLCJub25jZSI6IlNVdVNhT3FVeHVwYUVDbi1HYjdRRERmM3ljU2ZUTE5KNk11VWhJbnZ6YXciLCJhbGciOiJSUzI1NiIsIng1dCI6Ii1LSTNROW5OUjdiUm9meG1lWm9YcWJIWkdldyIsImtpZCI6Ii1LSTNROW5OUjdiUm9meG1lWm9YcWJIWkdldyJ9.eyJhdWQiOiJodHRwczovL2dyYXBoLm1pY3Jvc29mdC5jb20iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC85ZmM5OTk1OC1k
I was able to resolve this one by modifying the deploy.ps1 like this.
Replaced line 414 with
Connect-MgGraph -AccessToken ($token.Token |ConvertTo-SecureString -AsPlainText -Force)
This allowed it to deploy.
Now I'm getting another authentication issue that MIGHT be related, but the error is different.
I'm monitoring the ListCallQueues process and it's throwing a lot of red but the gist of it looks like it thinks it has a wrong username and password. Now I'm assuming that it's binding by using the service account I created? I also gave it an E5 license on the off chance that was it and I also made sure it was excluded in my MFA policy, but I can't figure this out.
Any help would be greatly appreciated!
Here is some of the output from the logs.
Connected!
2023-09-27T08:59:44Z [Information] Executing 'Functions.ListCallQueues' (Reason='This function was programmatically called via the host APIs.', Id=04aec9ff-d1d0-44e3-823c-bba9503abf0d)
2023-09-27T09:00:10Z [Information] OUTPUT: PS Result>
2023-09-27T09:00:10Z [Information] Executed 'Functions.ListCallQueues' (Succeeded, Id=04aec9ff-d1d0-44e3-823c-bba9503abf0d, Duration=25990ms)
2023-09-27T09:00:11Z [Error] ERROR: Session is not established, run Connect-MicrosoftTeams before requesting access token

Exception :
Type : System.UnauthorizedAccessException
TargetSite :
Name : GetAccessToken
DeclaringType : Microsoft.Teams.ConfigApi.Cmdlets.CmdletHostWrapper, Microsoft.Teams.ConfigAPI.Cmdlets.private, Version=5.728.1.0, Culture=neutral, PublicKeyToken=null
MemberType : Method
Module : Microsoft.Teams.ConfigAPI.Cmdlets.private.dll
Message : Session is not established, run Connect-MicrosoftTeams before requesting access token
Source : Microsoft.Teams.ConfigAPI.Cmdlets.private
HResult : -2147024891
StackTrace :
at Microsoft.Teams.ConfigApi.Cmdlets.CmdletHostWrapper.GetAccessToken(String appId, String scope)
at Microsoft.Teams.ConfigApi.Cmdlets.SessionStateStore.Microsoft.Teams.ConfigApi.Cmdlets.ISessionStateStore.GetSessionState()
at Microsoft.Teams.ConfigApi.Cmdlets.SessionStateStore.get_ConfigApiSessionInfo()
at Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Module.SendAsync(InvocationInfo invocationInfo, HttpRequestMessage request, IEventListener callback, ISendAsync next)
at Microsoft.Teams.ConfigAPI.Cmdlets.Generated.ConfigApiBasedCmdlets.CallQueueGet_Call(HttpRequestMessage request, Func3 onOk, IEventListener eventListener, ISendAsync sender) at Microsoft.Teams.ConfigAPI.Cmdlets.Generated.ConfigApiBasedCmdlets.CallQueueGet_Call(HttpRequestMessage request, Func3 onOk, IEventListener eventListener, ISendAsync sender)
at Microsoft.Teams.ConfigAPI.Cmdlets.Generated.ConfigApiBasedCmdlets.CallQueueGet(Nullable1 first, Nullable1 skip, Nullable1 excludeContent, String nameFilter, String typeFilter, String sortBy, Nullable1 descending, Nullable1 filterInvalidObos, Func3 onOk, IEventListener eventListener, ISendAsync sender)
at Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Cmdlets.GetCsCallQueue_Get.ProcessRecordAsync()
at Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Cmdlets.GetCsCallQueue_Get.ProcessRecordAsync()
CategoryInfo : NotSpecified: (:) [Get-CsCallQueue_Get], UnauthorizedAccessException
FullyQualifiedErrorId : Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Cmdlets.GetCsCallQueue_Get
InvocationInfo :
MyCommand : Get-CsCallQueue_Get
ScriptLineNumber : 3412
OffsetInLine : 9
HistoryId : 1
ScriptName : C:\home\data\ManagedDependencies\2309270734360645583.r\MicrosoftTeams\4.6.0\custom\Merged_custom_PsExt.ps1
Line : $result = Microsoft.Teams.ConfigAPI.Cmdlets.internal\Get-CsCallQueue @PSBoundParameters

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.