sp-dev-fx-webparts/samples/react-graph-groupviewer/README.md

86 lines
4.9 KiB
Markdown
Raw Normal View History

2021-09-27 22:44:13 -04:00
# Graph Group Viewer
## Summary
2021-11-21 03:00:49 -05:00
This web part will provide the functionality to search for groups in your tenant and allow you to view the details of the selected group as well as view a list of group members and export the list of members to a CSV file.
2021-09-27 22:44:13 -04:00
![picture of the web part in action](assets/preview.gif)
## Compatibility
| :warning: Important |
|:---------------------------|
| Every SPFx version is only compatible with specific version(s) of Node.js. In order to be able to build this sample, please ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node.|
|Refer to <https://aka.ms/spfx-matrix> for more information on SPFx compatibility. |
2021-09-27 22:44:13 -04:00
![SPFx 1.12.1](https://img.shields.io/badge/SPFx-1.12.1-green.svg)
2021-11-01 21:07:49 -04:00
![Node.js v14 | v12 | v10](https://img.shields.io/badge/Node.js-v14%20%7C%20v12%20%7C%20v10-green.svg)
2021-09-27 22:44:13 -04:00
![SharePoint Online](https://img.shields.io/badge/SharePoint-Online-yellow.svg)
![Teams N/A: Untested with Microsoft Teams](https://img.shields.io/badge/Teams-N%2FA-lightgrey.svg "Untested with Microsoft Teams")
![Workbench Hosted: Does not work with local workbench](https://img.shields.io/badge/Workbench-Hosted-yellow.svg "Does not work with local workbench")
2022-02-14 02:52:18 -05:00
![Compatible with Remote Containers](https://img.shields.io/badge/Remote%20Containers-Compatible-green.svg)
2021-09-27 22:44:13 -04:00
## Applies to
2022-10-24 09:42:45 -04:00
* [SharePoint Framework](https://learn.microsoft.com/sharepoint/dev/spfx/sharepoint-framework-overview)
* [Microsoft 365 tenant](https://learn.microsoft.com/sharepoint/dev/spfx/set-up-your-development-environment)
* [Microsoft Graph](https://learn.microsoft.com/graph/overview)
2021-09-27 22:44:13 -04:00
* [PnP React Controls](https://pnp.github.io/sp-dev-fx-controls-react/)
2023-02-18 22:58:44 -05:00
## Contributors
2021-09-27 22:44:13 -04:00
2023-03-15 01:23:34 -04:00
* [Zach Roberts](https://github.com/zachroberts8668)
2021-09-27 22:44:13 -04:00
## Version history
Version|Date|Comments
-------|----|--------
1.0|September 27, 2021|Initial release
## Prerequisites
2023-03-15 01:23:34 -04:00
There are no prerequisites to use this web part.
2021-09-27 22:44:13 -04:00
## Minimal Path to Awesome
* Clone this repository
* If your SharePoint tenant does not already allow API access to the following Microsoft Graph permissions: Directory.Read.All, Group.Read.All and GroupMember.Read.All then please follow the below instructions.
* in the command line run:
* `npm install`
* `gulp build --ship`
* `gulp bundle --ship`
* `gulp package-solution --ship`
* browse to your SharePoint app catalog and load the SPFX package. Once loaded you will need to browse to your SharePoint Admin Center and under advanced you will need to open Api Access and allow the requests for Microsoft Graph.
* If you have the APIs permissions already allowed you can follow the below steps.
* in the command line run:
* `npm install`
* `gulp serve --nobrowser`
* browse to your hosted workbench and add the web part.
2021-09-27 22:44:13 -04:00
2022-02-14 02:52:18 -05:00
> This sample can also be opened with [VS Code Remote Development](https://code.visualstudio.com/docs/remote/remote-overview). Visit https://aka.ms/spfx-devcontainer for further instructions.
2021-09-27 22:44:13 -04:00
## Features
This Web Part illustrates the following concepts on top of the SharePoint Framework:
* Using Microsoft Graph to search for groups and return group members for the selected group.
* Exporting loaded data to a CSV file using [CSVLink](https://github.com/react-csv/react-csv)
## Help
We do not support samples, but we 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.
2021-11-20 23:55:10 -05:00
If you encounter any issues while using this sample, [create a new issue](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected%2Csample%3A%20react-graph-groupviewer&template=bug-report.yml&sample=react-graph-groupviewer&authors=@zroberts8668&title=react-graph-groupviewer%20-%20).
2021-09-27 22:44:13 -04:00
2021-11-20 23:55:10 -05:00
For questions regarding this sample, [create a new question](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aquestion%2Csample%3A%20react-graph-groupviewer&template=question.yml&sample=react-graph-groupviewer&authors=@zroberts8668&title=react-graph-groupviewer%20-%20).
2021-09-27 22:44:13 -04:00
2021-11-20 23:55:10 -05:00
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aenhancement%2Csample%3A%20react-graph-groupviewer&template=question.yml&sample=react-graph-groupviewer&authors=@zroberts8668&title=react-graph-groupviewer%20-%20).
2021-09-27 22:44:13 -04:00
2021-11-07 02:11:17 -05:00
## 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.**
2023-03-12 21:16:15 -04:00
<img src="https://m365-visitor-stats.azurewebsites.net/sp-dev-fx-webparts/samples/react-graph-groupviewer" />