Guests can attend meetings, view documents and chat in Teams they’re invited to. In this blog post I am going to show you a One-Liner for inviting guests to your Microsoft 365 tenant. Let’s dive in.
Connect to Azure AD
First of all we need to connect to Azure AD.
If this command fails, you may need to install the module if you haven’t already.
Install-Module AzureAD -AllowClobber -Force
Now we are ready for the action. The command below invites a user and redirects this user to an URL.
New-AzureADMSInvitation ` -InvitedUserEmailAddress firstname.lastname@example.org ` -SendInvitationMessage $True ` -InviteRedirectUrl "http://myapps.microsoft.com"