简体   繁体   中英

What fields in Azure AD or Teams Provisioning are the source of entities.country/locale info in the JSON delivered to Teams App messaging endpoint?

Microsoft Teams <-> Azure AD Bot Registration w/ Teams Channel <-> Custom Teams App/Bot Messaging End Point using Bot Framework.

We have a Custom Teams App built using Microsoft Bot Framework. We wish to use some of geo attributes provided by Teams to the messaging end point in the incoming messaging delivered from Teams to our chat bot, in particular entities.country and entities.locale (These are described in Microsoft Schema https://docs.microsoft.com/en-us/microsoftteams/platform/resources/bot-v3/bot-conversations/bots-conversations#full-inbound-schema-example and excerpted below)

在此处输入图像描述

We believe that these attributes are sourced from Azure AD User Profile, but would like to know which field. And if not from Azure AD data which data fields or configurations.

We have a customer where the Country (CO and C) are properly set as a country other than US, however Teams Bot Conversation JSON reports US as the country in entities.country and not the country configured in Azure AD. (Teams tenant appears to be hosted in Western Europe, so somehow during the Teams license provisioning perhaps some country attributes are getting over ridden from their values in Azure AD).

entities.country and entities.locale get populated from the Teams settings. We tried as below.

  1. When the APP language is English(US), we got the below payload at the bot endpoint.

在此处输入图像描述

"entities": [
        {
            "locale": "en-US",
            "country": "US",
            "platform": "Web",
            "timezone": "Asia/Calcutta",
            "type": "clientInfo"
        }
    ]
  1. When the APP language is English(India), we got the below payload at the bot endpoint.

在此处输入图像描述

"entities": [
        {
            "locale": "en-IN",
            "country": "IN",
            "platform": "Web",
            "timezone": "Asia/Calcutta",
            "type": "clientInfo"
        }
    ]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM