Skip to content

Commit 0f258f9

Browse files
authored
Updated Bot Powered ACEs with .NET articles (SharePoint#9998)
* Initial commit of articles about Bot Powered ACEs * Updated article about building first Bot Powered ACE * Added metadata to articles * Fixed issues in articles, accordingly to guidance * Fixed issues in articles, accordingly to guidance * Finalized initial batch of articles about Bot Powered ACEs * Finalized initial batch of articles about Bot Powered ACEs * Added article about security for Bot Powered ACEs * Updated articles about Bot Powered ACEs * Updated articles about Bot Powered ACEs * Updated articles about Bot Powered ACEs * Finalized second batch of articles about Bot Powered ACEs * Finalized second batch of articles about Bot Powered ACEs * Finalized second batch of articles about Bot Powered ACEs * Finalized second batch of articles about Bot Powered ACEs * Added article about Look Book PnP templates provisioning * Finalized article about Look Book PnP templates provisioning * Finalized article about look book PnP templates provisioning * Fixed learn.microsoft.com URLs * Fixed learn.microsoft.com URLs * Updated applying-pnp-templates.md to fix an issue * Fixed article applying-pnp-templates.md * Fixed article applying-pnp-templates.md * Updated articles about Bot Powered ACEs in .NET * Updated articles about Bot Powered ACEs security * Fixed article about security * Updated docs about security for Bot Powered ACEs * Finalized articles about Bot Powered ACEs security * Updates articles about Bot Powered ACEs security * Added article about Bot Powered ACEs with TTK+TS
1 parent 8c36ebb commit 0f258f9

22 files changed

+1637
-525
lines changed

docs/spfx/viva/bot-powered/AuthN-and-AuthZ-in-Bot-Powered-ACEs-Entra.md

Lines changed: 513 additions & 0 deletions
Large diffs are not rendered by default.

docs/spfx/viva/bot-powered/AuthN-and-AuthZ-in-Bot-Powered-ACEs-Magic-Code.md

Lines changed: 544 additions & 0 deletions
Large diffs are not rendered by default.

docs/spfx/viva/bot-powered/AuthN-and-AuthZ-in-Bot-Powered-ACEs.md

Lines changed: 24 additions & 513 deletions
Large diffs are not rendered by default.

docs/spfx/viva/bot-powered/Building-Your-First-Bot-Powered-ACE-TTK-TS.md

Lines changed: 530 additions & 0 deletions
Large diffs are not rendered by default.

docs/spfx/viva/bot-powered/Building-Your-First-Bot-Powered-ACE.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: Building your first Bot Powered Adaptive Card Extension
2+
title: Building your first Bot Powered Adaptive Card Extension with .NET
33
description: Learn how to build your first Bot Powered Adaptive Card Extension using the Bot Framework for Microsoft .NET.
4-
ms.date: 02/01/2024
4+
ms.date: 10/30/2024
55
ms.localizationpriority: high
66
---
7-
# Building your first Bot Powered Adaptive Card Extension
7+
# Building your first Bot Powered Adaptive Card Extension with .NET
88

9-
Bot Powered Adaptive Card Extensions (ACEs) for Microsoft Viva Connections enables extending the Microsoft Viva Connections Dashboard using the Bot development model.
9+
Bot Powered Adaptive Card Extensions (ACEs) for Microsoft Viva Connections enable extending the Microsoft Viva Connections Dashboard using the Bot development model.
1010

1111
From a development point of view, a Bot Powered ACE behaves like a regular client-side ACE built with SharePoint Framework (SPFx). As such, you can render Card Views, Quick Views, you can provide properties configurable via a Property Pane, and you can implement specific behaviors to handle actions in the user interface of the ACE. You can learn more about the basics of client-side Adaptive Card Extensions for Microsoft Viva Connections by reading the tutorial ["Build your first SharePoint Adaptive Card Extension."](../get-started/build-first-sharepoint-adaptive-card-extension.md)
1212

13-
In this tutorial, you learn how to build a basic Bot Powered ACE with a step by step approach. You can build Bot Powered ACEs either using C# and .NET or using TypeScript and Node.js.
13+
You can build Bot Powered ACEs either using C# and .NET or using TypeScript and Node.js. In this tutorial, you learn how to build a basic Bot Powered ACE using C# with a step by step approach.
1414

1515
You can learn more about the architecture of the Bot Powered ACEs by reading the article ["Understanding Bot Powered Adaptive Card Extensions."](./Understanding-Bot-Powered-ACEs.md)
1616

@@ -70,7 +70,7 @@ In the automatically scaffolded solution, you find a bunch of autogenerated file
7070

7171
### Registering the Bot in Azure
7272

73-
Before proceeding with the actual implementation of the Bot Powered ACE, you need to register a Bot in Microsoft Azure.
73+
Before proceeding with the actual implementation of the Bot Powered ACE, you need to register a Bot in Microsoft Azure.
7474

7575
Open a web browser and navigate to the [Azure Management Portal](https://portal.azure.com/). From the Azure Management Portal home page, select "Create a resource" and choose to create an "Azure Bot" service.
7676

@@ -85,7 +85,7 @@ Provide a handle for your Bot, which must be compliant with the following rules:
8585

8686
The Bot handle becomes the display name of the Bot. However, you can change the display name later, while the Bot Handle is immutable, once registered.
8787

88-
Choose a target subscription and resource group, as well a data residency policy. From a pricing point of view, while you're developing and testing with Bot Powered ACEs, you can select the "F0 - Free" pricing tier. Once you're ready to release your Bot in production, you can upgrade the pricing tier to "S1 - Standard."
88+
Choose a target subscription and resource group, as well as a data residency policy. From a pricing point of view, while you're developing and testing with Bot Powered ACEs, you can select the "F0 - Free" pricing tier. Once you're ready to release your Bot in production, you can upgrade the pricing tier to "S1 - Standard."
8989

9090
A Microsoft App ID is required to register an Azure Bot. Depending on your solution, you can select a different type of application through the "Type of App" option. You can choose any of the following options:
9191

@@ -136,7 +136,7 @@ Once you configured the URL for your Bot, you need to configure few more setting
136136

137137
#### Microsoft App configuration
138138

139-
You're brought to the "Certificates & secrets" configuration page of the Microsoft App registered in Microsoft Entra ID for your Bot. From within this page, you can configure a new client secret. Copy the value of the new client secret in a safe place, you reuse it later in this tutorial.
139+
You're brought to the "Certificates & secrets" configuration page of the Microsoft App registered in Microsoft Entra ID for your Bot. From within this page, you can configure a new client secret. Copy the value of the new client secret in a safe place, you are going to reuse it later in this tutorial.
140140

141141
Now, select the "Overview" panel and save in a safe place, together with the client secret, the values of the following settings:
142142

@@ -479,6 +479,17 @@ For example, the `TextInputCardViewParameters` instance is made of the following
479479

480480
In the code excerpt, the images used to render the Card Views are downloaded from the web site hosted in the Bot project, and available under the **wwwroot** folder of the project. In that folder, you should upload the **Media** subfolder that you can find in the [samples folder of the reference GitHub repository](https://github.com/SharePoint/sp-dev-docs/tree/main/assets/bot-powered/Media).
481481

482+
#### Serving Card Views requests
483+
484+
To serve the card views, you need to implement the `OnSharePointTaskGetCardViewAsync` method so that it will return the instance of the card view to collect feedback that you created in the constructor. Here follows the method implementation.
485+
486+
```CSharp
487+
protected override Task<CardViewResponse> OnSharePointTaskGetCardViewAsync(ITurnContext<IInvokeActivity> turnContext, AceRequest aceRequest, CancellationToken cancellationToken)
488+
{
489+
return Task.FromResult(cardViews[CollectFeedbackCardView_ID]);
490+
}
491+
```
492+
482493
#### Handling user's tasks and actions
483494

484495
When the user selects on the submit action in a Card View, the `OnSharePointTaskHandleActionAsync` method is triggered and you can handle the submission event. In the following code excerpt, you can see how the ACE collects the feedback submission.
@@ -667,7 +678,7 @@ The manifest file should look like the following one:
667678
}
668679
```
669680

670-
In the **manifest.json** file, you should replace `<App-Client-ID>` with the actual Client ID of your Microsoft App. You should also configure the actual URL of your Bot in the `validDomains` section of the manifest. Lastly, you should consider providing real values for the settings in the `developer` section.
681+
In the **manifest.json** file, you should replace `<App-Client-ID>` with the actual Client ID of your Microsoft App. You should also configure the actual URL of your Bot in the `validDomains` section of the manifest. Lastly, you should consider providing real values for the settings in the `developer` section. All of the URLs in the `developer` section need to target addresses under HTTPS.
671682

672683
Notice the `dashboardCards` section that defines the actual settings for your Bot Powered ACEs. In particular, through this section you can configure the `id` of the Microsoft App backing your Azure Bot, the `displayName` and `description` of the ACE, as well as the `icon` as a Fluent UI Icon, the Bot that handles the requests and that must be configured in the `bots` section of the **manifest.json**, and last but not least the `defaultSize` for your ACE in the Viva Connections Dashboard.
673684

@@ -676,7 +687,7 @@ You can consider copying and reusing the images and the **manifest.json** templa
676687
### Run and test the solution
677688

678689
You're now ready to package and deploy your custom solution. You simply need to package the **manifest.json** file and the two images into a .ZIP file, like you would do with any other Microsoft Teams or Microsoft 365 custom application. Name the .ZIP file with whatever name you like, open the App Catalog of your target SharePoint Online tenant, and upload the .ZIP file as a new application package.
679-
The SharePoint Online server-side infrastructure recognizes the manifest structure and prompt you to enable and deploy the solution on the tenant.
690+
The SharePoint Online server-side infrastructure recognizes the manifest structure and prompts you to enable and deploy the solution on the tenant.
680691

681692
![The UI of the new SharePoint AppCatalog prompting to enable the solution and make it tenant-wide available.](./images/App-Catalog-Package-Publishing.png)
682693

docs/spfx/viva/bot-powered/Overview-Bot-Powered-ACEs.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ From a developer point of view, you build the ACE once and you can benefit of it
2626

2727
In this series of articles, you can understand what Bot Powered Adaptive Card Extensions (ACEs) for Microsoft Viva Connections are, their architecture, and how to build real-life solutions.
2828

29-
The series of articles covers the following articles:
29+
The series of articles covers the following topics:
3030

31-
1. [Building your first Bot Powered Adaptive Card Extension](Building-Your-First-Bot-Powered-ACE.md)
31+
1. [Building your first Bot Powered Adaptive Card Extension with .NET](Building-Your-First-Bot-Powered-ACE.md)
32+
1. [Building your first Bot Powered Adaptive Card Extension with Microsoft Teams Toolkit and TypeScript](Building-Your-First-Bot-Powered-ACE-TTK-TS.md)
3233
1. [Understanding Bot Powered Adaptive Card Extensions](Understanding-Bot-Powered-ACEs.md)
3334
1. [Authentication and Authorization in Bot Powered Adaptive Card Extensions](AuthN-and-AuthZ-in-Bot-Powered-ACEs.md)
35+
1. [Building Bot Powered Adaptive Card Extensions with Microsoft Entra ID and Single Sign-on](AuthN-and-AuthZ-in-Bot-Powered-ACEs-Entra.md)
36+
1. [Building Bot Powered Adaptive Card Extensions with Magic Code authentication](AuthN-and-AuthZ-in-Bot-Powered-ACEs-Magic-Code.md)
3437

3538
By reading the above articles, you're able to manage the development of Bot Powered ACEs for Microsoft Viva Connections and to apply the potential of this new technology.
3639

Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)