With powershell add a guest user to my tenant AND a group...

%3CLINGO-SUB%20id%3D%22lingo-sub-2177715%22%20slang%3D%22en-US%22%3EWith%20powershell%20add%20a%20guest%20user%20to%20my%20tenant%20AND%20a%20group...%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2177715%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20you%20add%20a%20guest%20user%20to%20a%20tenan%20via%20Azure%20Active%20Directory%20you%20have%20the%20option%20to%20add%20Groups%20and%20roles.%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20you%20invite%20a%20user%2C%20it%20first%20sends%20an%20invitation%20email%20where%20the%20user%20have%20to%20accept%20the%20tenants%20policy.%20After%20the%20user%20have%20done%20that%20another%20email%20is%20sent%20with%20the%20group%20invite.%20So%20the%20user%20doesnt%20get%20both%20email%20at%20the%20same%20time...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20do%20i%20do%20this%20with%20powershell%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20only%20found%20this%3A%26nbsp%3B%3CBR%20%2F%3E%3CSPAN%3E%3CSPAN%20class%3D%22hljs-pscommand%22%3ENew-AzureADMSInvitation%3C%2FSPAN%3E%3CSPAN%20class%3D%22hljs-parameter%22%3E%20-InvitedUserDisplayName%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-string%22%3E%22Sanda%22%3C%2FSPAN%3E%3CSPAN%20class%3D%22hljs-parameter%22%3E%20-InvitedUserEmailAddress%3C%2FSPAN%3E%20sanda%40fabrikam.com%3CSPAN%20class%3D%22hljs-parameter%22%3E%20-InviteRedirectURL%3C%2FSPAN%3E%20%3CA%20href%3D%22https%3A%2F%2Fmyapps.microsoft.com%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmyapps.microsoft.com%3C%2FA%3E%3CSPAN%20class%3D%22hljs-parameter%22%3E%20-SendInvitationMessage%3C%2FSPAN%3E%20%3CSPAN%20class%3D%22hljs-literal%22%3E%24true%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2177715%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%20Groups%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

When you add a guest user to a tenan via Azure Active Directory GUI you have the option to add Groups and roles. 

When you invite a user, it first sends an invitation email where the user have to accept the tenants policy. After the user have done that another email is sent with the group invite. So the user doesnt get both email at the same time...

 

How do i do this with powershell? 

 

Have only found this: 
New-AzureADMSInvitation -InvitedUserDisplayName "Sanda" -InvitedUserEmailAddress sanda@fabrikam.com -InviteRedirectURL https://myapps.microsoft.com -SendInvitationMessage $true

 

0 Replies