Skip to content

Extends teams channel get command with support for teamName and channelName options#1918

Merged
plamber merged 2 commits intopnp:masterfrom
nanddeepn:extend-teams-channel-get
Nov 5, 2020
Merged

Extends teams channel get command with support for teamName and channelName options#1918
plamber merged 2 commits intopnp:masterfrom
nanddeepn:extend-teams-channel-get

Conversation

@nanddeepn
Copy link
Copy Markdown
Contributor

Extended teams channel get command with support to get information using teamName and channelName as options.
Closes #1887

@plamber
Copy link
Copy Markdown
Contributor

plamber commented Nov 1, 2020

Thank you. We will have a look into this asap

@plamber plamber self-requested a review November 1, 2020 14:16
Copy link
Copy Markdown
Contributor

@plamber plamber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your submission. Would you please have a look on my comment?

}

const teamRequestOptions: any = {
url: `${this.resource}/v1.0/me/joinedTeams?$filter=displayName eq '${encodeURIComponent(args.options.teamName as string)}'`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By running this endpoint you assume that the person running the query filters the Teams just by the ones he/she is member of. Administrators might want to perform the query over several Teams

To have a more general approach I would suggest that you are going to use the /v1.0/groups endpoint and then filter by resourceProvisioningOptions -> Teams

@nanddeepn
Copy link
Copy Markdown
Contributor Author

Hi @plamber
Please review

@plamber
Copy link
Copy Markdown
Contributor

plamber commented Nov 5, 2020

Thank you for the work. Looks good to me

@plamber plamber merged commit 2cf70a5 into pnp:master Nov 5, 2020
@nanddeepn nanddeepn deleted the extend-teams-channel-get branch December 5, 2020 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancement : Extend teams channel get to get information using teamName and channelName as options

2 participants