sp-dev-fx-webparts/samples/react-my-teams
Hugo Bernier 6e5ebe9cab
Merge pull request #4861 from pnp/dependabot/npm_and_yarn/samples/react-my-teams/follow-redirects-1.15.6
2024-03-25 22:06:40 -04:00
..
.devcontainer
assets
config
src
teams
.gitignore
.npmignore
.yo-rc.json
README.md Added more contributions 2023-03-15 01:23:34 -04:00
gulpfile.js
package-lock.json Merge pull request #4861 from pnp/dependabot/npm_and_yarn/samples/react-my-teams/follow-redirects-1.15.6 2024-03-25 22:06:40 -04:00
package.json Bump postcss and @microsoft/sp-build-web in /samples/react-my-teams 2023-10-03 18:55:33 +00:00
tsconfig.json
tslint.json

README.md

My Teams

Summary

This sample uses Microsoft Graph to list the Teams the current user is a member of. When the user clicks on one of the teams, the web part retrieves information about the default channel (General) and opens it. The web part can be configured to open the team on the web browser or client app.

Demo

Compatibility

⚠️ 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.

SPFx 1.13.1 Node.js v14 Compatible with SharePoint Online Compatible with SharePoint 2019 Does not work with SharePoint 2016 (Feature Pack 2) Compatible with Remote Containers

Applies to

Prerequisites

  • Microsoft 365 subscription with SharePoint Online license
  • SharePoint Framework development environment already set up.

Contributors

Version history

Version Date Comments
1.1 December 18, 2021 Upgraded for SPFx v1.13.1
1.0 February 26, 2019 Initial release

Minimal Path to Awesome

In the command line run:

npm install
gulp serve --nobrowser

Navigate to the hosted version of SharePoint workbench, eg. https://contoso.sharepoint.com/_layouts/15/workbench.aspx

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

Grant the service principal permission to the Microsoft Graph API

Once installed, the solution will request the required permissions via the Office 365 admin portal. If you prefer to approve the permissions in advance, for example when testing the solution in the Workbench page without installing it, you can do so using Office 365 CLI:

o365 spo login https://contoso-admin.sharepoint.com
o365 spo serviceprincipal grant add --resource 'Microsoft Graph' --scope 'User.Read.All'
o365 spo serviceprincipal grant add --resource 'Microsoft Graph' --scope 'User.ReadWrite.All'
o365 spo serviceprincipal grant add --resource 'Microsoft Graph' --scope 'Group.Read.All'
o365 spo serviceprincipal grant add --resource 'Microsoft Graph' --scope 'Group.ReadWrite.All'

Features

This Web Part lists all the teams the current user is a member of.

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](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected%2Csample%3A%20react-my-teams&template=bug-report.yml&sample=react-my-teams&authors=@joelfmrodrigues @yhabersaat&title=react-my-teams%20-%20).

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-my-teams&template=question.yml&sample=react-my-teams&authors=@joelfmrodrigues @yhabersaat&title=react-my-teams%20-%20).

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-my-teams&template=suggestion.yml&sample=react-my-teams&authors=@joelfmrodrigues @yhabersaat&title=react-my-teams%20-%20).

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.