Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions articles/dotnet/bot-builder-dotnet-core-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ public class Startup
From **Solution Explorer** add a new empty class called **MessagesController.cs**. In the **MessagesController.cs** class, update the **Post** method with the code below. This will allow your bot to send and receive messages for the user.

```cs
private IConfiguration configuration;

public MessagesController(IConfiguration configuration)
{
this.configuration = configuration;
}

[Authorize(Roles = "Bot")]
[HttpPost]
public async Task<OkResult> Post([FromBody] Activity activity)
Expand Down