In which scenario "webApplicationInfo" nad "validDomains" needs to be configured in manifest.json?

Copper Contributor

Hi, can someone help me to understand the behavior of "webApplicationInfo" and "validDomains" property in manifest.json?

 

<webApplicationInfo>

https://docs.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema#webapplica...

 

<validDomains>

https://docs.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema#validdomai...

 

I have created Teams Custom Bot Application (developed by Bot Framework v4) and in this app, Azure AD authentication and Graph API call (following below tutorial: https://docs.microsoft.com/en-us/graph/tutorials/bot-framework?tutorial-step=3), and API call to Azure QnA Maker endpoint is implemented.

 

So based on the doc's property definition, I thought I need to configure below infos in manifest.json, but actually application works (user can login, call graph api, can communicate with qna maker) in teams without those configuration.

・"webApplicationInfo"'s id : bot application id

・"validDomains" : token.botframework.com (redirect uri while AAD authentication), <QnAMakerName>.azurewebsites.net (for qna maker endpoint call)

 

Is it expected behavior? if expected, in which scenario those properties should be configured?

 

My Manifest.json

・validDomains is not configured

・webApplicationId is not configured (property not exist in manifest.json)

yuu113_0-1647826641345.png

Bot Appications's Behavior

・user can login

yuu113_1-1647826925891.png

yuu113_2-1647826990541.png

yuu113_3-1647827040114.png

 

・bot app can call Graph API

yuu113_4-1647827113714.png

 

・Bot can communicate with QnA Maker (can get answer from QnA Maker).

yuu113_5-1647827216916.png

 

Thank you very much in advance!

7 Replies
@yuu113 - We are looking into this I will get back to you soon.

@yuu113 -1. If you want to add SSO in your application, you have to add web application information.
2.If you want to render any website/page, then you need to add that domains name inside valid domains section. 

 

Thanks, 

Sayali

----------------------------------------------------------------------------------------

If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. 

@yuu113 - Could you please confirm if your issue has resolved with above suggestion or still looking for any help?

Thank you very much for the quick confirmation!

Regarding 2nd question, let me confirm 1 point.
I could understood "QnA Maker endpoint" need not to be configured in "validDomains" as there's no UI rendering.

But regarding "token.botframework.com", as per the below official doc, it's mentioned that it needs to be set in "validDomains", but in my case, app works without this configuration and also from your explanation, seems not necessary.
Is it really necessary in this scenario then?

https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/authentication/add-authenticati...

Thank you very much!

Thank you for the quick reply!
Actually, As I mentioned in the issue summary, I could complete AAD authentication without adding "token.botframework.com" to validDomains and it seems expected based on your explanation (because there is no UI rendering in App)..

How can I understand this situation? Kindly help my understanding, thank you very much!

@yuu113 -We are confirming this with internal team. If there is no need ,we can remove this section in that document  and as I mention above "If you want to render any website/page, then you need to add that domains name inside valid domains section. " in that scenario we are added Valid domain.