A simple SPFx feedback webpart which sends notifications to a Microsoft Teams channel when any user gives a feedback for a page in the portal. Uses adaptive cards for both the feedback form as well as the notification message for the connector(Incoming Webhook) to post notification in Teams.
Get your own free development tenant by subscribing to Microsoft 365 developer program
Solution | Author(s) |
---|---|
react-page-feedback.sppkg | Rabia Williams |
Version | Date | Comments |
---|---|---|
1.0 | December 13, 2020 | Initial release |
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-
Clone this repository
-
Ensure that you are at the solution folder
-
in the command-line run:
- npm install
- gulp serve
-
Update the webpart settings to have the URL to your configured Incoming Webhook URL, see here how you can configure one
Microsoft Graph API Permission has to be granted at a minimum of User.Read. Check this blog for more info on how to do that Grant API Permission using CLI for Microsoft365, previously knows as Office365CLI.
- The webhook URL is configurable for ease of change (should ideally be a secret, but used as a setting here for demo purpose)
- Uses Graph to get user information to be clear on the feedback card in Teams conversation.
- Used adaptive cards for easy development in SPFx as well as to post the message to Teams, making it more interactive and grab more attention.
- Getting started with SharePoint Framework
- Building for Microsoft teams
- Use Microsoft Graph in your solution
- Publish SharePoint Framework applications to the Marketplace
- Microsoft 365 Patterns and Practices - Guidance, tooling, samples and open-source controls for your Microsoft 365 development