-
Notifications
You must be signed in to change notification settings - Fork 347
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
Make New-PnPTeamsTeam work with Managed Identity #3351
Conversation
Is the call to |
8aba935
to
e4b3bc6
Compare
Thanks @damsleth for your contribution! Appreciate it! |
@damsleth @KoenZomers @wobba is it now possible to Teamify a non-group-based team site from an Azure function by a managed identity? |
@khha A site has to have an associated AAD group in order to be used in a Team. So you need to group'ify first still if you have a stand-alone site you want to use as a Team. So the description of this cmdlet stands as per https://pnp.github.io/powershell/cmdlets/New-PnPTeamsTeam.html |
@wobba but in the documentation I see "If the Microsoft 365 Group does not exist yet, it will create it first and then add a Microsoft Teams team to the group.". It looks like they build it by design to Groupify automatically before Teamify. Thats exactly where I am looking for because I would like to Groupify and Teamify. |
My motto is always seeing is believing :) Just give it a try and see if it works. One thing I stumbled upon myself is that in 2.5.0 it seems that something with regards to Managed Identity is broken. Still need to dig into that. Give it a try with 2.4.0 to play on the safe side of things. |
@hajjkh correct. The cmdlet does not take a SharePoint site as input, so the description is correct. Here is the technical ways you can get to a team.
This cmdlet cover scenario 1 and 2. Above, If someone wants to extend it to scenario 3, that is a possibility. Which is effectivly calling Add-PnPMicrosoft365GroupToSite first. As we're using powershell, just run the two commands in sequence :) |
@wobba I would like to Teamify existing SharePoint team sites. My script is working local under my account as SharePoint administrator. But from an Azure function under a managed identity not. I use this sequence:
I will try an older version of the pnp module. Let's hope it will work. |
May be that PnPMicrosoft365GroupToSite don't work with app permissions. Haven't checked. |
@wobba @KoenZomers still not working in pnp version 2.4.0 |
Type
Related Issues?
Fixes #2977, #1807
What is in this Pull Request ?
/teams/{group.Id}/members/add
endpoint when there is no team fails withNew-PnPTeamsTeam: Not Found (404): No Team found with Group id: {groupId}
/me
endpoint when an owner is already resolved. This is particularly useful when using a managed identity, since/me
calls are only valid with a delegated auth flow.