Skip to content

Commit 5dc96ff

Browse files
Update MyTeams to use new library mgt-spfx
1 parent 53d5bf3 commit 5dc96ff

File tree

6 files changed

+31705
-78
lines changed

6 files changed

+31705
-78
lines changed
28 KB
Loading

docs/documentation/docs/controls/MyTeams.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
This control show all Teams the user has access (joined),and for each Team the user can see the channels has permissions and quick open the channel or if callback is specified can return the Team Id and Channel Id for use in App.
44

5-
The user can quick see the members and owner of group.
6-
This control use [mgt-toolkit](https://docs.microsoft.com/en-us/graph/toolkit/overview) component [People](https://docs.microsoft.com/en-us/graph/toolkit/components/people) that can be configured to show Person Card on hover.
5+
The user can quick see the members and owner of the group.
6+
This control uses the [People](https://docs.microsoft.com/en-us/graph/toolkit/components/people) component from [mgt-toolkit](https://docs.microsoft.com/en-us/graph/toolkit/overview) that can be configured to show Person Card on hover. Please refer to required dependencies section to install the [mgt-spfx](https://docs.microsoft.com/en-gb/graph/toolkit/get-started/mgt-spfx) library in your tenant.
77

88
Here is an example of the control:
99

@@ -13,6 +13,16 @@ Here is an example of the control:
1313

1414
![myTeams](../assets/myteams01.png)
1515

16+
## Required dependencies
17+
18+
In order to resolve an issue using controls from [mgt-toolkit](https://docs.microsoft.com/en-us/graph/toolkit/overview) within SharePoint Framework solutions, the mgt team created an SPFx library that should be deployed to your tenant. For the MyTeams control to work, we had no other option but to add a dependency on the mgt-spfx library. More information about mgt-spfx is available [here](https://docs.microsoft.com/en-gb/graph/toolkit/get-started/mgt-spfx)
19+
20+
Simply download the `mgt-spfx-2.2.0.sppkg` file from the link below and deploy to the SharePoint app catalog, making the solution available to all sites in the tenant.
21+
22+
[mgt-spfx direct download link](https://github.com/microsoftgraph/microsoft-graph-toolkit/releases/download/v2.2.0/mgt-spfx-2.2.0.sppkg)
23+
24+
![myTeams](../assets/mgtSPFxPackageDeploy.png)
25+
1626
## How to use this control in your solutions
1727

1828
- Check that you installed the `@pnp/spfx-controls-react` dependency. Check out the [getting started](../../#getting-started) page for more information about installing the dependency.
@@ -41,7 +51,6 @@ import { MyTeams } from "@pnp/spfx-controls-react/lib/MyTeams";
4151
/>
4252
```
4353

44-
4554
- The `onSelectedChannel` callback returns the teamId and ChannelId and can be implemented as follows:
4655

4756
```TypeScript
@@ -53,7 +62,6 @@ import { MyTeams } from "@pnp/spfx-controls-react/lib/MyTeams";
5362

5463
## Implementation
5564

56-
5765
The `MyTeams` control can be configured with the following properties:
5866

5967
| Property | Type | Required | Description |
@@ -64,11 +72,10 @@ The `MyTeams` control can be configured with the following properties:
6472
| enablePersonCardInteraction | boolean | no | Show Person Card on hover |
6573
| onSelectedChannel | (teamId:string,channelId:string) => void; | no | callBack with TeamId and ChannelId Selected |
6674

67-
68-
## MSGraph Permissions required
75+
## MSGraph Permissions required
6976

7077
This control required the flowing scopes :
7178

7279
at least : Team.ReadBasic.All, Channel.ReadBasic.All, TeamMember.Read.All
7380
and all Scopes used by [mgt-people](https://docs.microsoft.com/en-us/graph/toolkit/components/people),
74-
and [Person-Card](https://docs.microsoft.com/en-us/graph/toolkit/components/person-card) components
81+
and [Person-Card](https://docs.microsoft.com/en-us/graph/toolkit/components/person-card) components

0 commit comments

Comments
 (0)