Add to Slack - MS Bot framework - he Bot Directory is no longer accepting new submissions - botframework

I am enabling slack channel in MS bot framework. All mentioned steps are done and from my own ID i am able to communicate with bot.
However, I when I give "Add to Slack" button to another slack user, it asks for permissions. After allowing the permission, the user is transferred to https://bots.botframework.com/ webpage where following is written:
Persmissions snapshot: Permissions snapshot before bot framework page
error page
The Bot Directory is no longer accepting new submissions. Add your bot to the Bing channel so users will not only be able to find it, but chat with it too
I have already enabled bot for public in slack settings, and users should be able to chat with bot who have the ID of bot.
Looks like some change has been done from Microsoft, which I am not aware of. Ideally it should take the user to conversation page

In order for user to chat with your bot on Slack, you DO NOT need to use that link to connect them. The method you're attempting is to give them a roundabout admin access, which won't actually work.
In order for your users to communicate with your bot, once it's properly connected to Slack, they can simply select it on the app list, like so:
Additionally, you as the admin, can add the bot to a particular channel, where the users can chat with the bot directly.

Related

DM to any user on Slack using Slack API

I'm trying to send Direct Messages (DMs) to a user on Slack using chat.postMessage using Bot token. But I'm only able to send messages to the users that are in my workspace.
How can I send message to any user on another workspaces?
When I try to do so, I get: "error": "channel_not_found"
I've that user's UserID (U02....), user's email and my Bot token.
When you create a bot/app in Slack, you grant it OAuth Scopes which provide the bot access to certain information in your Slack instance. So for example, I expect you have added the users:read Bot Token Scope to your Slack app, so that it can determine the users, and userId's in your workspace.
However, this scope restricts the bot to only see users in your workspace.
There's a couple of ways around this though:
Solution 1 - Slack Connect
Now in Slack, you can message users in other workspaces with a feature called Slack Connect.
You'll first need to establish a connection with the user you want the bot to message. This can be arranged via an invite process, and once completed that userId should become available to the bot. You can use that userId in the channel field of the chat.postMessage API to direct message the user from the other workspace.
Solution 2 - Org Level App
If you are on an Enterprise version of Slack, you should have multiple workspaces within a company, that are all linked by an enterpriseId.
In this case, a possible solution might be to create what is known as an Org Level App to have access to information across multiple workspaces. More information on Org Level apps can be found here.

Microsoft Graph/Teams-is there a way to list a user's channels using delegated permissions?

I'm trying to convert some bot logic to use delegated permissions instead of application ones, but I'm running into an issue with a bot feature that can post to a Teams channel from a 1:1 conversation. The user can ask the bot to post to a channel, and this works fine, but when I take away Group.ReadWrite.All, I can't find a workaround that doesn't require admin consent. Here's the current flow:
Get the user's joined teams (me/joinedTeams-gets the user's joined Teams. This requires Team.ReadBasic.All.
Get the channels in the team (/teams/{id}/channels). This requires Group.Read.All (admin consent)
Post to the channel (/teams/{id}/channels/{id}/messages) which requires ChannelMessage.Send
So with delegated, non-admin permissions, I can list a user's teams, post a message to a channel on their behalf, but not list the channels on their joined teams? The docs here say that you need delegated Group.Read.All or ReadWrite.All, both of which require admin consent.
Is there another way that I'm missing to get a list of teams/channels for a user to cross-post to? I don't want to have to add the bot to the channel. I suppose I could create/store a list of connectors for each channel, but that's a lot of extra user overhead. The challenge is that I want to deploy this bot to an org that refuses to give any application/admin consent permissions to 3p apps.
I have no idea how I missed this, but there's a Channel.ReadBasic.All permission that doesn't require admin consent. This means I can do something like this in my bot:
Get a user's joined teams with graphClient.Users[aadUserId].JoinedTeams.Request().GetAsync()
Get the team's channels with graphClient.Teams[teamID].Channels.Request().GetAsync()
Post to the channel as outlined in the docs with c.Teams[teamID].Channels[channelID].Messages.Request().AddAsync(chatMessage).GetAwaiter().GetResult();
The only difference here is that the message is attributed to the user and not the bot, but as long as that's OK, this is a way to have a user initiated cross-post from a bot to a Team.

Add a Google Chat bot programmatically

I have a web application for organizations. I would like to allow users to add an existing Google Chat bot to their Google Chat workspace programmatically - example workflow: Jack visits mywebsite.com, presses button 'Add site bot' and the bot gets added to their Google Chat where the bot can asynchronously message the user.
Is this functionality possible at the moment or does the user have to connect the bot manually through the Google Chat interface?
Thanks,
Mihai

Skype Channel: Unable to login with 'Sign in' to save your chat

I have enabled Skype channel for my bot which on top of chat window shows option to login. I am unable to login using my work ID, rather I could login with my personal Microsoft account.
I could not find much documentation on this. How can I enable bot so that bot users can login only with their work email id?
This is the expected behavior as Skype doesn't let you create an account anymore with a business email address. If you want to test your bot by connecting it to Skype channel, then you can use your personal account. The Skype for Business channel is specifically designed for the usage of work email ID but it is being deprecated on the Bot Framework. I would suggest you to connect the bot to Microsoft Teams to login using work email ID.

Can't add bot to group chat

I've created a bot (a simple echo bot) and deployed it to Azure. Everything works well now and I can talk to the bot in the desktop Skype client (Windows 10 app).
However, I can't seem to be able to add the bot to an existing group chat. When I click on the add button the list of contacts to add doesn't have my bot in it, which is weird because I've added it to my contacts.
https://stackoverflow.com/a/41644443/249230
^ According to that post I need to create a "private chat" with my bot and then I'll be able to add it to group chats, but I have no idea how to do that.
I haven't published my bot, but I did enable "Allow adding to a group" in bot settings on https://dev.botframework.com.
Any idea why it's not working?
Private chat is talking directly to your bot. If you have added it to your contacts, it should be easy to open a direct conversation with it by double clicking.
Then you can add people in the conversation using the top right button:
Then you will have your group chat working:
Note for other people asking the same question (but you already mentioned that you did it), don't forget to activate the group conversation for your bot in botframework portal, in Skype channel settings
Have you tried to add a bot to group?:
https://telegram.me/[botname]?startgroup=foo

Resources