sp-dev-fx-webparts/samples/react-groups-teams
Hugo Bernier 8e6bd1404b Added web part to every sample 2024-04-18 01:51:29 -04:00
..
.devcontainer Added all 1.12.1 and 1.13 containers 2022-02-14 02:52:18 -05:00
assets Added web part to every sample 2024-04-18 01:51:29 -04:00
config
release Initial Push- react-groups-teams Version 2.0.0 2023-02-26 20:16:16 -05:00
src Updated sample.json and fixed linting issues 2023-03-11 15:12:16 -05:00
teams
.editorconfig
.gitignore
.yo-rc.json
README.md Added more contributions 2023-03-15 01:23:34 -04:00
gulpfile.js
npm-shrinkwrap.json Initial Push- react-groups-teams Version 2.0.0 2023-02-26 20:16:16 -05:00
package.json Initial Push- react-groups-teams Version 2.0.0 2023-02-26 20:16:16 -05:00
tsconfig.json Initial Push- react-groups-teams Version 2.0.0 2023-02-26 20:16:16 -05:00
tslint.json Initial Push- react-groups-teams Version 2.0.0 2023-02-26 20:16:16 -05:00

README.md

All Microsoft 365 Groups and Teams with SPFx

Summary

Web part pulls all Microsoft 365 Groups and Teams that the logged in user has access to view.

  • Toggle- View groups signed in user is a member of or all groups
  • Group Name (hover for group description)
  • Link to Group email
  • Link to SharePoint site
  • Link to calendar
  • Link to Planner plan (if available)
  • Group privacy filter (Private/Public/All)
  • Microsoft Teams team link for the Group
  • Pagination (breaks results into pages and displays page numbers)
  • Style toggle (Card/Table)
  • Group display selection
    1. Select 5, 10, or 15 groups to display per page for the Table display style
    2. Select 6, 9, and 12 groups to display per page for the Card display style

picture of the web part in action picture of the web part in action picture of the web part in action

Compatibility

SPFx 1.12.1 Node.js v14 | v12 | v10 Compatible with SharePoint Online Does not work with SharePoint 2019 Does not work with SharePoint 2016 (Feature Pack 2) Local Workbench Incompatible Hosted Workbench Compatible Compatible with Remote Containers

Applies to

Contributors

Version history

Version Date Comments
1.0.0 April 16, 2021 Initial release
1.0.1 August 1, 2021 Fixed references to Office.com
1.1.0 October 8, 2021 Upgraded to SPFx 1.12.1 for higher compatibility and added Teams Tab deployment support.
2.0.0 February 26, 2023 Added new styles (card/table), added page display settings/pagination

Prerequisites

  • Administrative access to Azure AD of Microsoft 365 tenant
  • SharePoint Online tenant
  • You need following set of permissions in order to manage Microsoft 365 Groups and Teams
"webApiPermissionRequests": [{
      "resource": "Microsoft Graph",
      "scope": "Groups.Read.All"
    }, {
      "resource": "Team",
      "scope": "Teams.ReadBasic.All"
    }]

Minimal Path to Awesome

  • Clone this repo
  • Navigate to the folder with current sample
  • Restore dependencies: $ npm i
  • Bundle the solution: $ gulp bundle --ship
  • Package the solution: $ gulp package-solution --ship
  • Upload to SharePoint tenant app catalog
  • You will see a message saying that solution has pending permissions which need to be approved
  • Approve the permission requests.
  • Run $ gulp serve --nobrowser
  • Open hosted workbench, i.e. https://<tenant>.sharepoint.com/sites/<your site>/_layouts/15/workbench.aspx
  • Search and add O365 Groups Manager web part to see it in action

This sample can also be opened with VS Code Remote Development. Visit https://aka.ms/spfx-devcontainer for further instructions.

Features

This project contains sample client-side web part built on the SharePoint Framework illustrating possibilities to quickly gain access to features in Microsoft 365 Groups and Teams using React and MS Graph.

This sample illustrates the following concepts on top of the SharePoint Framework:

  • Explore MS Graph APIs for Microsoft 365 Group
  • Using the MSGraphClient in a SharePoint Framework web part
  • Requesting API permissions in a SharePoint Framework package
  • Communicating with the Microsoft Graph using its REST API
  • Using Office UI Fabric controls for building SharePoint Framework client-side web parts
  • Passing web part properties to React components

Video

Building a React groups and teams web part for aggregating detailed information for end users

Help

We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.

If you're having issues building the solution, please run spfx doctor from within the solution folder to diagnose incompatibility issues with your environment.

You can try looking at issues related to this sample to see if anybody else is having the same issues.

You can also try looking at discussions related to this sample and see what the community is saying. If you encounter any issues while using this sample, create a new issue.

For questions regarding this sample, create a new question.

Finally, if you have an idea for improvement, make a suggestion.

Disclaimer

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.