06-14-2018 11:45 PM
Hi,
Is it possible to add new members to a team automatically?
We have a team called "general". In this channel there should be all of our employees.
Let´s say our company gets 2 new employees. Both of them will be in the active directory group "employees". Is it possible that they will be automatically added to the team "general"?
Kind Regards
Mathias
06-14-2018 11:49 PM
Hi Mathias!
Yes You can achieve this by making the teams Azure AD-group dynamic: https://docs.microsoft.com/en-us/azure/active-directory/active-directory-groups-dynamic-membership-a...
06-14-2018 11:54 PM
Thanks I will try this.
If I create a new group in the Azure AD will it be created in our Active Directory aswell?
06-15-2018 12:03 AM
Then You have to use Writeback. (Takes a little planning before you do that though...)
06-15-2018 12:11 AM
Okay thanks. I wanted to try this out now. Unfortunately I don´t get the membership type "Dynamic User" or the "Dynamic membership rules" that are described in your first link.
Am I doing something wrong?
06-15-2018 10:56 AM
06-19-2018 07:34 AM
SolutionDynamic groups are the easy way to do this, but if you don't want to pay for the Azure AD P1 premium licenses, it's easy to script a solution with PowerShell.
1. Look for all new mailboxes (use a custom attribute to indicate whether the user is processed).
2. Call Add-TeamUser, Add-UnifiedGroupLinks, or Add-AzureADGroupMember to update the group/team with the new members.
3. Update the mailboxes to show that the users have been processed.
4. Stir and repeat daily.
06-26-2018 06:02 AM
I am kinda new to PowerShell.
Do you have an example code or script for me? It would be easier for me to understand what exactly I need to do.
06-26-2018 08:14 AM
https://www.petri.com/teams-powershell-primer will give you plenty of tips about how to use the Teams PowerShell module.
Every mailbox has 15 customizable attributes that you can use for your own purposes. Here's how to update a mailbox using CustomAttribute1 with a value that you can later check.
Set-Mailbox -Id Someone -CustomAttribute "Y"
To find all mailboxes that do not have the attribute set:
$Mbx = (Get-Mailbox -Filter {CustomAttribute1 -ne "Y"})
Now process each mailbox and add them to the Office 365 Group (you could also use Add-TeamUser but this is easier because it saves loading a module). Then also update the mailbox so we don't process it again.
ForEach ($M in $Mbx) {
Add-UnifiedGroupLinks -Id MyGroup -LinkType Members -Links $M.Alias
Set-Mailbox -Id $M.Alias -CustomAttribute1 "Y"
}
If you're getting into this kind of stuff, perhaps you should buy a good book that discusses how to use PowerShell with Groups and Teams. Like Office 365 for IT Pros (which I am involved in).
10-08-2018 12:19 PM
12-04-2018 06:33 PM
Hi @Mathias Koprek, have you seen the new "Org-wide Teams" settings yet?
https://docs.microsoft.com/en-us/microsoftteams/create-an-org-wide-team
12-05-2018 02:36 AM
As noted earlier, org-wide teams are now available if your tenant is under 1,000 users. https://office365itpros.com/2018/10/10/org-wide-teams-now-available/
If not, you'll still have to think about another method to add new users to a team automatically, subject to the limit for a team (currently 2,500 members).
01-17-2019 06:21 AM
Looks like Cayosoft has recently (Dec 2018) eliminated their <200 users-for-free option - their tool does a great job for Teams, AD and exchange mgmt without Powershell, but pricing more realistic for the 500+ companies.
01-17-2019 08:21 AM