Configure Bot Framework bots for US Government customers
Article
This article is for US government customers who are deploying Bot Framework and Azure AI Bot Service bots to the Microsoft Azure Government cloud.
Tip
Bots in Azure Government that connect to Microsoft Teams must use the Microsoft Office 365 Government Community Cloud (GCC) High environment.
This article describes how to configure a bot to work with the Azure Government cloud and with the Office 365 GCC High environment.
Prerequisites
An account in the Azure Government cloud.
To extend Teams, an Azure Bot resource created in the Office 365 GCC High environment.
The C# or JavaScript bot project you want to configure.
Bot Framework SDK version 4.14 or later.
Use the cloud adapter
Make sure that your bot uses the cloud adapter, or an adapter that derives from the cloud adapter.
The cloud adapter lets you specify settings specific to the Azure Government cloud and the Office 365 GCC High environment.
The ConfigurationBotFrameworkAuthentication class reads authentication settings from your bot configuration file.
The cloud adapter, when it's created, will use these authentication settings.
Make sure that the ConfigureServices method in your Startup.cs file contains this line.
The ConfigurationBotFrameworkAuthentication constructor reads authentication settings from your bot configuration file.
In your index.js file, the code to create your adapter should look like this:
const botFrameworkAuthentication = new ConfigurationBotFrameworkAuthentication(process.env);
const adapter = new CloudAdapter(botFrameworkAuthentication);
Configure for Azure Government
The Azure Government cloud uses https://botframework.azure.us for the channel service endpoint.
For most channels, setting the channel service endpoint is sufficient.
See the next section for additional settings required to support Microsoft Teams in the Office 365 GCC High environment.
For Office 365 services, additional settings are required to handle user authentication correctly.
Currently, only the Microsoft Teams channel is available in the Office 365 GCC High environment.
There is also a DoD environment which shares most (but not all) settings with the Office 365 GCC High environment. For the DoD environment use the following settings.
Your bot can use various identity providers to access resources on behalf of a user, such as Microsoft Entra ID and many other OAuth providers.
The Office 365 GCC High environment uses a redirect URL that is different from the ones used for other environments.
When configuring your bot for authentication within the Office 365 GCC High environment, use https://tokengcch.botframework.azure.us/.auth/web/redirect as the OAuth redirect URL and follow the steps in how to add authentication to your bot.
Additional information
For more information about Microsoft Azure Government and Office 365 Government High, see:
With these steps your bot should be configured to work successfully in the Azure Government cloud and the Office 365 GCC High environment.
Other useful references regarding Bot Service in Azure Government.
Learn to develop a cloud computing digital transformation solution for the public sector. Use Azure, Azure Stack Hub, and Azure Stack Edge. Enforce data sovereignty, address custom compliance requirements, and apply all available protection to highly sensitive data.
Demonstrate skills to plan, deploy, configure, and manage Microsoft Teams to focus on efficient and effective collaboration and communication in a Microsoft 365 environment.
This app demonstrates using bot conversation events in Microsoft Teams, supporting adaptive cards, read receipts, and message update events. It includes immersive reader support for enhanced accessibility.