I'm looking for a way to bulk add guest users while including their display names and email addresses. I also want to do this without sending out any notifications. Any suggestions on how to achieve this?
1 Answer
You can easily do this using the Graph module with PowerShell! Just use the **New-MgInvitation** command, which has all the options you need. You’ll want to loop through your list of users that includes their display names and email addresses, and then send out the invites without any notifications. Here's a quick example of how that could look:
```powershell
Foreach($user in $users){
$InviteParams = @{
InvitedUserEmailAddress = $user.UserPrincipalName
InviteRedirectUrl = "https://myapps.microsoft.com"
InvitedUserDisplayName = $user.displayName
SendInvitationMessage = $false
InvitedUserType = "guest"
}
New-MgInvitation -BodyParameter $InviteParams
}
```
This should work for you!

Thank you. It worked perfect.