How to get teams context in Spfx react solution?
Here is the method to get ms teams message using msgraphclientFactory
There are two ways to access context information within teams through tab context and bot context. Please follow up with the documentation for Tab context and Bot Context.
Related
Half a year ago we created a bot using the App Studio app from Teams. This worked well and the bot is running happily. Apparently starting 2022 App Studio "evolved":
So, this time using the new "evolved" Developer Portal, we registered a similar bot in another environment.
Just to end up with a bot that somehow is not registered in the Microsoft-internal bot framework tenant. I cannot say how we ended up in this state but there is a troubleshooting site that we can use to verify our failed state. The result of this simple call looks like this:
For googleability:
AADSTS700016: Application with identifier
'68dafaa0-5755-4433-8f47-3e174c5ed131' was not found in the directory
'Bot Framework'. 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.
Now the question: how can we add our bot to this "Bot Framework" tenant? And: which of the button clicks in the Dev Center and/or Bot Framework portal do the magic of adding the bot? The troubleshooting article unfortunately gives no advice on how to fix this situation.
We also tried removing the bot via the Bot Framework portal and re-created it with the same IDs and had the hope this fixes the situation. Unfortunately not.
Note: everything else is in place and looks like our other functioning bot. A teams app containing the bot, the Azure AD app registration with the bot ID, the bot in the bot portal, correct client secret. Everything seems correct except that the bot ID is missing from the Bot Framework tenant.
Just ran into the same issue. It looks like you have your bot registered into your tenant (and not the global bot framework). So you can get the access token by changing the URL to the following (replacing with your tenant id):
https://login.microsoftonline.com/YOUR-TENANT-ID/oauth2/v2.0/token
Just tested this and was able to get an access token. Now will that token actually work the same way using the scope is another matter. You may need to change the scope to:
https://graph.microsoft.com/.default
As of now I am getting a token either way
To generate a bot directly into the global tenant you can go to the following URL and click on "My Bots" and then "Create". Any existing bots you have should also appear here:
https://dev.botframework.com/
Slack recently deprecated the bot scope in favor of more granular scopes. I have already migrated my app from the bot scope to granular scopes on the Slack' developer portal. I'm trying to get an embed code for my "Add to Slack" button. I'm trying to get the embed code from channel settings on Bot services as defined here https://learn.microsoft.com/en-us/azure/bot-service/bot-service-channel-connect-slack?view=azure-bot-service-4.0&tabs=abs
The embed code in my channel settings still point to Slack' legacy bot scope. The embed code is
https://slack.com/oauth/authorize?scope=bot/oauth/.....
I'm expecting an embed code that points to the new granular scopes on oauth2, the URL i expect would be https://slack.com/oauthv2/authorize?scope=app_mentions:read....
Is there a workaround to this issue?
Pointing back to the GitHub equivalent.
You need to remove the the slack channel and then re-add it. This will give the V2 auth, and then you will be able to modify the scopes.
I have developed a chatbot using Azure's Bot Framework, and am using the Facebook Messenger channel. I also have a persistent menu that I am using for easy quick actions. And I am also using the Handover Protocol to pass thread control between my Bot and my human customer support.
The problem I am finding is that even after I use the Handover to pass thread control to my human customer support, basically disabling my bot, it will still answer to the user if they use the persistent menu actions. Is there any way for me to disable this, for the persistent menu only being shown or active, or have its actions only functioning when the thread control belongs to the Bot?
I have a similar issue looking for some recommendations.
Have you got some thing on this which resolved your issue or still this is an issue for your bot ?
I created a simple Bot and its working fine in bot emulator.
I published this Bot into Microsoft azure and trying to registering my Bot with the Microsoft Bot Framework.
I am getting the following error.
object reference not set to an instance of an object.
Can anyone please help ?
According to this issue: https://github.com/Microsoft/BotBuilder/issues/1012 This error can occur if you do not put a url in the terms of use form field.
I have a chatbot where I have created several waterfall dialogs that each have their own starting context. I would like to be able to embed an iframe pointed to my bot, but tell it which one of these waterfalls to start at instead of "/". Is that possible?