The user created don't have the role "Guest"
Opened this issue · 7 comments
Hi,
the script work, but into Office Administration Console the user don't have the role guest and the invitation to him is not sent.
Hi
Thanks for testing out my script. From the context, I get that you tried the 'AddGuestToTeams.ps1'?
I altered the script so the UserType is correctly set to Guest. This wasn't an issue in my organisation because the users aren't granted any license. Also beware the users now have to change their password on first login.
The Powershell modules I used don't send mails by default. I'll look into sending a seperate mail. This will require some research and some trial and (a lot of) error.
I'll keep you posted.
Yes I have user AddGuestToTeams. Today I'll try the change.
Now the user have Guest flag, but maybe there is another problem. Into User List of Azure Active Directory the target is "Azure Active Directory" instead of "External Azure Active Directory".
When you add a user from Teams interface the user have "External Azure Active Directory" as target.
And at end, when call Add-TeamUser, in Teams GUI in the list it is Member and not Guest.
I think that there are a lot of problems with these powershell packages. I don't know if there are security problems with users created in this way.
Regards
Pasquale
Hi Pasquale
I fully agree with you. The powershell modules are insuffuciant. What we're doing here is creating a new user, with a new password. It's not really a Guest. Given the tools Microsoft delivers, this is the best workaround we can achieve. There are some features request that would solve our problems like a proper powershell module. For now we can only make the best of it...
Hi,
this is another way, but send generic invitation and don't associate the user to a team
https://medium.com/@doolatunde/send-bulk-guest-teams-invite-with-powershell-7f094f00af2d
Thanks! I'll look into this.
Hi @pasdif
I was able to use this and I created InviteGuestToTeam.ps1
. This will send an invite and afterwards add the user to the team. That last action is needed if the team is private. I renamed the AddGuestToTeams
to CreateGuestAndAddToTeam.ps1
. There's still an use-case for this.
Give it a whirl when you find the time.