Forum Discussion
Importing External Users to Office 365 Group
I'm attempting to add external users to a Microsoft 365 Group (NOT a distribution list) by importing them from a CSV file using Powershell. The CSV has the EmailAddress header, and the individual addresses on separate lines. The group exists in my Tennant, the account I'm trying to import with is a group owner. Group is set to public (for now).
I use the command Import-CSV "csvlist" | ForEach-Object {Add-UnifiedGroupLinks -Identity "listname" -LinkType Members -Links $_.EmailAddress}
That command works perfectly well if the addresses being imported are AD members, but not with external addresses. Attempting to import external addresses, I get the error:
+ CategoryInfo : NotSpecified: (LISTNAME:UnifiedGroupIdParameter) [Add-UnifiedGroupLinks], ADNoSuchObjectException
+ FullyQualifiedErrorId : [Server=BYAPR01MB3750,RequestId=9a0cbc22-3cf4-4834-a447-b96fbf546f12,TimeStamp=6/24/2022 6:52:49 PM] [FailureCategory=Cmdlet-ADNoSuchObjectException] A6F2F038,Microsoft.Exchange.Management.RecipientTasks.AddUnifiedGroupLinks
+ PSComputerName : outlook.office365.com
I've found articles telling how to add external users to a group thru Outlook but I've got 1100 groups I'm trying to update. I don't want to use Distribution groups since any external addresses added to them have to be added as an Exchange contact (and with those 1100 groups, that's THOUSANDS of external contacts...) and I've read many articles that this action SHOULD be available. Am I doing something wrong, or is MS just thumbing its nose at me?
Thanks!
- Hello Mike,
I think that you will have to first, add them as guests to your tenant, they will get a guest account that you can use to add later to the group
So that would be a two-step process,
This is to invite in bulk B2B users
https://docs.microsoft.com/en-us/azure/active-directory/external-identities/tutorial-bulk-invite
https://docs.microsoft.com/en-us/azure/active-directory/external-identities/b2b-quickstart-invite-powershell