You are viewing an earlier version of the admin guide. For the latest version, please visit EmpowerID Admin Guide v7.211.0.0.
Provisioning a Bot Tenant
EmpowerID Bot is flexible enough so that the settings from your Azure infrastructure can be configured. Provisioning a Bot tenant allows a tenant (i.e., an organization) to provide the appropriate values of its services and configurations to the Bot Service. Please follow the steps below to provision the bot tenant.
Add a new item to the bot config container in the bot_database Cosmos DB database created earlier.
Â
Copy-paste the JSON document below as the item value. This document is a starting point for the tenant configuration. Fill in the valid values, as applicable, based on the resources we created in the previous steps. Please find these keys and a sample JSON document for configuration is also provided below.
{ "document": { "Locale": "en-US", "TenantId": "[GUID]", "WorkflowServiceUrl": "https://sso.empoweriam.com", "WebChatUrl": "https://mychat.azurewebsites.net/api/Callback/OAuth", "WebChatTokenSecretKey": "[Secret Key]", "WebChatTokenUrl": "https://directline.botframework.com/v3/directline/tokens/generate", "UserExperience": { "MaxProcessTimeInSeconds": "10", "MaxRequestTimeoutInSeconds": "3" }, "StateBlobConfig": { "ConnectionString": "[Blob connection string]", "ConainerName": "[container name]", "BlobName": "[blob name]" }, "LuisAI": { "AppId": "[Luis App Id]", "PredictionKey": "[Luis Prediction key]", "PredictionEndpoint": "https://westus.api.cognitive.microsoft.com/" }, "StateDatabaseConfig": { "CosmosDbEndpoint": "https://mydb.documents.azure.com/", "AuthKey": "[Auth key]", "DatabaseId": "bot_database", "ContainerId": "conversation", "CosmosClientOptions": { "MaxTcpConnectionsPerEndpoint": null, "MaxRequestsPerTcpConnection": null, "OpenTcpConnectionTimeout": null, "IdleTcpConnectionTimeout": null, "MaxRetryWaitTimeOnRateLimitedRequests": null, "MaxRetryAttemptsOnRateLimitedRequests": null, "ConnectionMode": 0, "RequestTimeout": "00:00:00", "GatewayModeMaxConnectionLimit": 0, "ApplicationRegion": null, "ApplicationName": null, "ConsistencyLevel": null }, "ContainerThroughput": 400, "KeySuffix": null, "CompatibilityMode": false }, "TemplateDatabaseConfig": { "CosmosDbEndpoint": "https://mydb.documents.azure.com/", "AuthKey": "[Auth key]", "DatabaseId": "bot_database", "ContainerId": "templates", "CosmosClientOptions": { "MaxTcpConnectionsPerEndpoint": null, "MaxRequestsPerTcpConnection": null, "OpenTcpConnectionTimeout": null, "IdleTcpConnectionTimeout": null, "MaxRetryWaitTimeOnRateLimitedRequests": null, "MaxRetryAttemptsOnRateLimitedRequests": null, "ConnectionMode": 0, "RequestTimeout": "00:00:00", "GatewayModeMaxConnectionLimit": 0, "ApplicationRegion": null, "ApplicationName": null, "ConsistencyLevel": null }, "ContainerThroughput": 400, "KeySuffix": null, "CompatibilityMode": false }, "OAuthConfig": { "ApiKey": "[Api Key]", "ClientID": "[Client ID]", "Secret": "[Client Secret]", "TokenInfoUrl": "https://sso.empoweriam.com/oauth/v2/tokeninfo", "TokenUrl": "https://sso.empoweriam.com/oauth/v2/token", "AuthorizeUrl": "https://sso.empoweriam.com/oauth/v2/ui/authorize", "UserInfoUrl": "https://sso.empoweriam.com/oauth/v2/userinfo", "RevokeUrl": "https://sso.empoweriam.com/oauth/v2/tokenrevoke" }, "AppSettingsJson64": null, "BaseWorkflow": "BotBaseWorkflow", "AuthWorkflow": "BotAuthWorkflow", "AskToSeeTemplate": "AskToSeeTemplate", "AskToSeeCardTemplate": "AskToSee", "id": "botsvcconfig_[GUID]" }, "realId": "botsvcconfig_[GUID]", "id": "botsvcconfig_[GUID]", "PartitionKey": "botsvcconfig_[GUID]" }
Key | Description |
---|---|
Locale | Specifies the Locale the Bot Service should use for this tenant, e.g., |
TenantId | Specifies the Tenant ID. This is the Azure AD Tenant ID for your Microsoft Teams |
WorkflowServiceUrl | Specifies the EmpowerID Workflow Service URL, where your Botflows reside. |
WebChatUrl | Specifies the URL to the Web Chat Bot application |
WebChatTokenSecretKey | Specifies the Direct Line Secret Key |
WebChatTokenUrl | Specifies Microsoft Direct Line Token URL (leave this unchanged to https://directline.botframework.com/v3/directline/tokens/generate) |
UserExperience | Use the UserExperience settings to specify the max time the service should wait to timeout request and notify the user upon completion.
|
StateBlobConfig | Use the StateBlobConfig settings to specify the Blob Storage Account, Container, and Blob where Non-JSON state data may be stored.
|
LuisAI | Use the LuisAI settings to specify the configuration for Luis AI.
|
StateDatabaseConfig | Use the StateDatabaseConfig settings to specify the Cosmos DB storage, where JSON state data may be stored.
|
TemplateDatabaseConfig | Use the TemplateDatabaseConfig settings to specify the Cosmos DB storage, where the Adaptive Card Templates the Bot Service are stored.
|
ContainerThroughput | Leave as is. |
KeySuffix | Leave as is. |
CompatibilityMode | Leave as is. |
OAuthConfig | Use the OAuthConfig settings to specify OAuth Server information. The settings here are self-explanatory. The ApiKey, ClientID, and Secret will come from the ‘Mobile Client & Chat Bot Application’ app in EmpowerID.
|
AppSettingsJson64 | Leave this setting unchanged to null. |
BaseWorkflow | Specifies the Base Botflow for the tenant. |
AuthWorkflow | Specifies the Bot Login Flow for the tenant. |
AskToSeeTemplate | Specifies CosmosDB item ID of the Ask to see template. |
AskToSeeCardTemplate | Specifies Card Template ID of the Ask to see template. |
id | Specify the ID of the current JSON document. Notice the naming convention (i.e., botsvcconfig_TenantID). Tenant ID of the tenant the Microsoft Teams is installed on. |
realId | Specifies the ID of the current JSON document in the realId, id, and PartitionKey. Notice the naming convention (i.e., botsvcconfig_TenantID). Tenant ID of the tenant the Microsoft Teams is installed on. |
id | botsvcconfig_[GUID]. Notice the naming convention (i.e., botsvcconfig_TenantID). Tenant ID of the tenant the Microsoft Teams is installed on. |
PartitionKey | botsvcconfig_[GUID]. |
A sample configuration for the tenant, as an example, is provided below.
Â
{
"document": {
"Locale": "en-US",
"TenantId": "0d8be8a9-3e46-4c80-8e50-4a1f7285c7c2",
"WorkflowServiceUrl": "https://michael.empoweriam.com",
"WebChatUrl": "https://eidwebchat.azurewebsites.net/api/Callback/OAuth",
"WebChatTokenSecretKey": "wE9j-bT5z9Q.eHGZe-citiqQ3dxyu_Y9zJ5zX02MZcPu-zDBKy4c2_g",
"WebChatTokenUrl": "https://directline.botframework.com/v3/directline/tokens/generate",
"UserExperience": {
"MaxProcessTimeInSeconds": "10",
"MaxRequestTimeoutInSeconds": "3"
},
"StateBlobConfig": {
"ConnectionString": "DefaultEndpointsProtocol=https;AccountName=eidazurejobengine;AccountKey=kNGSID50BEmwdInwNwbOyFmzrO+M/PggUHkSU5Nb9xq/ACzFj0CWn4H5SNALMY17TKJFz7qbnVa8qojP25dVhw==;EndpointSuffix=core.windows.net",
"ConainerName": "bot",
"BlobName": "data"
},
"LuisAI": {
"AppId": "67d4f5cd-73b4-4034-8789-d6872bd15b42",
"PredictionKey": "93a84538b63241718022c9994d83a46c",
"PredictionEndpoint": "https://westus.api.cognitive.microsoft.com/"
},
"StateDatabaseConfig": {
"CosmosDbEndpoint": "https://bottenanta.documents.azure.com/",
"AuthKey": "XVnMCpGNYobjpqJrVQbQS9vnBAx8oYDCPEwGLNjUddZnctob9jDP8aROR5d3IN4pO8SvXEglKIu92xJVBhOscQ==",
"DatabaseId": "botdb",
"ContainerId": "botdb",
"CosmosClientOptions": {
"MaxTcpConnectionsPerEndpoint": null,
"MaxRequestsPerTcpConnection": null,
"OpenTcpConnectionTimeout": null,
"IdleTcpConnectionTimeout": null,
"MaxRetryWaitTimeOnRateLimitedRequests": null,
"MaxRetryAttemptsOnRateLimitedRequests": null,
"ConnectionMode": 0,
"RequestTimeout": "00:00:00",
"GatewayModeMaxConnectionLimit": 0,
"ApplicationRegion": null,
"ApplicationName": null,
"ConsistencyLevel": null
},
"ContainerThroughput": 400,
"KeySuffix": null,
"CompatibilityMode": false
},
"TemplateDatabaseConfig": {
"CosmosDbEndpoint": "https://bottenanta.documents.azure.com/",
"AuthKey": "XVnMCpGNYobjpqJrVQbQS9vnBAx8oYDCPEwGLNjUddZnctob9jDP8aROR5d3IN4pO8SvXEglKIu92xJVBhOscQ==",
"DatabaseId": "botdb",
"ContainerId": "bottemplates",
"CosmosClientOptions": {
"MaxTcpConnectionsPerEndpoint": null,
"MaxRequestsPerTcpConnection": null,
"OpenTcpConnectionTimeout": null,
"IdleTcpConnectionTimeout": null,
"MaxRetryWaitTimeOnRateLimitedRequests": null,
"MaxRetryAttemptsOnRateLimitedRequests": null,
"ConnectionMode": 0,
"RequestTimeout": "00:00:00",
"GatewayModeMaxConnectionLimit": 0,
"ApplicationRegion": null,
"ApplicationName": null,
"ConsistencyLevel": null
},
"ContainerThroughput": 400,
"KeySuffix": null,
"CompatibilityMode": false
},
"OAuthConfig": {
"ApiKey": "7c90d994-7f94-47b3-8d63-4dfefd4ba389",
"ClientID": "b1ac3974-488b-40bc-ba52-e9cc81b74d68",
"Secret": "C1Gorhadn3btvsZlzvBl7DwQnwoW4N",
"TokenInfoUrl": "https://michael.empoweriam.com/oauth/v2/tokeninfo",
"TokenUrl": "https://michael.empoweriam.com/oauth/v2/token",
"AuthorizeUrl": "https://michael.empoweriam.com/oauth/v2/ui/authorize",
"UserInfoUrl": "https://michael.empoweriam.com/oauth/v2/userinfo",
"RevokeUrl": "https://michael.empoweriam.com/oauth/v2/tokenrevoke"
},
"AppSettingsJson64": null,
"BaseWorkflow": "BotBaseWorkflow",
"AuthWorkflow": "BotAuthWorkflow",
"AskToSeeTemplate": "AskToSeeTemplate",
"AskToSeeCardTemplate": "AskToSee",
"CreatedDateTimeUtc": "2020-12-31T04:19:57.4223927Z",
"id": "botsvcconfig_0d8be8a9-3e46-4c80-8e50-4a1f7285c7c2"
},
"realId": "botsvcconfig_0d8be8a9-3e46-4c80-8e50-4a1f7285c7c2",
"id": "botsvcconfig_0d8be8a9-3e46-4c80-8e50-4a1f7285c7c2",
"PartitionKey": "botsvcconfig_0d8be8a9-3e46-4c80-8e50-4a1f7285c7c2"
}