Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a private channel using application permissions and providing a list of members #1576

Open
1 task done
rollsrobby opened this issue Nov 14, 2024 · 2 comments
Open
1 task done
Labels
area: model 📐 Related to the core SDK models good first contribution Good for newcomers help wanted Extra attention is needed

Comments

@rollsrobby
Copy link

Category

  • Feature request

Describe the feature

Adding a private channel with Application Permissions by providing a list of members.
We can add private channels if we use delegated permissions, but this does not work on behalf of a user (using Application permissions), because graph requires a members property as seen here Create channel - Microsoft Graph v1.0 | Microsoft Learn

Describe the solution you'd like

Add the option to provide a list of members when adding a private channel. Maybe the TeamChannelOptions can be extended to accept a list of UPN's or Ids?

So we could do something like:

await team.Channels.AddAsync(channelName, new TeamChannelOptions
    { 
        Description = "This is my cool new Channel, check this out!", 
        MembershipType = TeamChannelMembershipType.Private,
        Members = [ "00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-111111111111
", "[email protected]" ]
    });

Additional context

I searched the issues and discussion but could not find a similar issue or request. If I missed it, please point me in the direction and feel free to close this. Same if this is already possible and I'm the issue.
I do think this 'feature' is available in PnP-Powershell Add-PnPTeamsChannel | PnP PowerShell.
This feature request specifically mentions private channels, but I think the same applies to shared channels.

@jansenbe jansenbe added the area: model 📐 Related to the core SDK models label Nov 18, 2024
@jansenbe jansenbe added good first contribution Good for newcomers help wanted Extra attention is needed labels Nov 18, 2024
@rollsrobby
Copy link
Author

Thank you for the pointers @jansenbe . I will try to work on this and open a PR in the near future if that's ok. I will need to read through the contribution docs before though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: model 📐 Related to the core SDK models good first contribution Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants