Closed dmklementiev-zz closed 3 years ago
The reason I am asking is that when I start the solution - two browsers come up with error 404 for https://localhost:8442/ and https://localhost:9442/ (values are the same as in this document.
My understanding is that the browsers should have empty context rather than not found error - is this correct?
My DNS Record look like:
Ngrok:
and BotService appsettings.local.json:
Any help is appreciated. Thank you.
Hi @dmklementiev, regarding the DNS configuration this is the original documentation we followed to run an application hosted media bot for the first time. Azure DNS is not an exclusive requirement, so you can use a platform of your choice. From what I could see in your comment, you've correctly added the DNS record.
With respect to the browsers that come up when you start the solution you should ignore that behavior, but if it is annoying, you can override that behavior by changing the launchBrowser setting to false, in the Management API and Bot Service launchSettings.json.
Despite that, did you have any issues running the solution locally?
Thank you Jonatan for your prompt response. Yes, I have one more issue running locally at the last step. When I POST meeting link in Postman I am getting the following response.
{ "value": { "stackTrace": " at Microsoft.Graph.Communications.Client.Transport.GraphClientWrapper.<ValidateAndWrapAsync>d__12
1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Graph.Communications.Client.Transport.GraphClientWrapper.2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Graph.Communications.Resources.StatefulResourceCollection
4.4.<GenerateStatefulResourceAsync>d__22.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.ConfiguredTaskAwaitable
1.ConfiguredTaskAwaiter.GetResult()\r\n at BotService.Infrastructure.Core.Bot.1.GetResult()\r\n at Application.Common.ValidationBehaviour
2.2.<Handle>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at MediatR.Pipeline.RequestExceptionActionProcessorBehavior
2.2.<Handle>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at MediatR.Pipeline.RequestPreProcessorBehavior
2.
I haven't had a deep investigation on this yet. It seems that authentication for MSGraph is failing with AAD. Not sure why though, so if you could suggest what the cause is that would be great.
Did a bit more investigation and here is what I see in the logs (actually "var logString = _formatter.Format(logEvent)" value in SampleObserver.cs)
$>2021-08-23T22:30:55.1627070Z Error: AuthenticationProvider.cs:95 AuthenticateOutboundRequestAsync ScenarioId: 2f4eb22f-8365-4352-975f-f038ffef2eff Failed to generate token for client: 3e534d8c-**** exception: AADSTS700016: Application with identifier '3e534d8c-****' was not found in the directory '72f988bf-*****'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant. Trace ID: 682a364f-f934-4f34-8ab8-e991938c0a00 Correlation ID: d74a7505-5267-4146-aae5-e78405ab298c Timestamp: 2021-08-23 22:30:55Z Response status code does not indicate success: 400 (BadRequest).
What is interesting is that '3e534d8c-**' is correct clientId for Bot application in AAD, but '72f988bf-***' is a random tenant and its value is not found in any configuration files. Have to say that I can recognize this tenantId which comes to play from totally unrelated project. Investigating further, but if you have any ideas how it gets to the BDK execution, please let me know.
@dmklementiev Have you created the app registration (for the Azure Bot) in the same tenant where you have Microsoft Teams?
Yes, however, I created a meeting in a different tenant, which I think is the problem since tenant id is a part of meeting link. I will try creating a meeting in the correct tenant and reply here with the result. Thank you!!!
@dmklementiev Were you able to test this again in the correct tenant?
Yes, sorry for the delay - it took me some time to set up Teams in the tenant properly. Running locally works now. Will try other/more advanced scenarios. Likely will have more questions :) Thanks a lot for your help.
@dmklementiev, Could you let me know how to set up Teams in the tenant?
Have you created the app registration (for the Azure Bot) in the same tenant where you have Microsoft Teams?
can you let me know this way? Thanks
@HaoTao95 - not sure if you are commenting on this issue (it is resolved) or the most recent one I opened .. In any case Azure Bot is created in the same tenant where I have MS Teams. Is there anything else I can check?
Also should we continue discussion here or in https://github.com/microsoft/Broadcast-Development-Kit/issues/34?
Thank you.
@dmklementiev Have you created the app registration (for the Azure Bot) in the same tenant where you have Microsoft Teams?
Hi @JonatanMedinilla, could you explain about this?
@dmklementiev , can you explain me how to create Azure Bot in the same tenant where I have MS Teams?
@HaoTao95, first off I am not an expert in this project. I am rather just beginning to understand how it works. To answer your question - I can only tell you how I did this. I registered Azure Bot as described in this document.
Have a question regarding adding a DNS record pointing to ngrok's TCP Url.
This document mentions that I have to add a DNS record pointing to ngrok's TCP Url while providing serviceFqdn.
Could you please explain how this should be done or point me to the right documentation?
Should I create a DNS zone in Azure and add a record pointing my domain to tcp.ngrok.io?