You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/documentation/docs/controls/MyTeams.md
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
3
3
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.
4
4
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.
7
7
8
8
Here is an example of the control:
9
9
@@ -13,6 +13,16 @@ Here is an example of the control:
13
13
14
14

15
15
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
+

25
+
16
26
## How to use this control in your solutions
17
27
18
28
- 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";
41
51
/>
42
52
```
43
53
44
-
45
54
- The `onSelectedChannel` callback returns the teamId and ChannelId and can be implemented as follows:
46
55
47
56
```TypeScript
@@ -53,7 +62,6 @@ import { MyTeams } from "@pnp/spfx-controls-react/lib/MyTeams";
53
62
54
63
## Implementation
55
64
56
-
57
65
The `MyTeams` control can be configured with the following properties:
58
66
59
67
| Property | Type | Required | Description |
@@ -64,11 +72,10 @@ The `MyTeams` control can be configured with the following properties:
64
72
| enablePersonCardInteraction | boolean | no | Show Person Card on hover |
65
73
| onSelectedChannel | (teamId:string,channelId:string) => void; | no | callBack with TeamId and ChannelId Selected |
66
74
67
-
68
-
## MSGraph Permissions required
75
+
## MSGraph Permissions required
69
76
70
77
This control required the flowing scopes :
71
78
72
79
at least : Team.ReadBasic.All, Channel.ReadBasic.All, TeamMember.Read.All
73
80
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