Acc-Creation

Rising Flight 4,596 Reputation points
2024-06-13T21:41:43.8866667+00:00

Hi All,

I want to create a guest account. I have logged in to the Exchange Online Admin Center and created a mail contact. However, I am not seeing this mail contact in Azure AD. Will mail contacts not show up in Azure AD? If i need to create a guest account in Azure AD should i use invite external user in EntraID? The guest account will be used for B2B. I want to invite external user in Azure EntraID, Please help me with PowerShell syntax to create guest users with below fields in EntraID, is the below syntax correct?

cc1

Microsoft Exchange Online
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,569 questions
Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,908 questions
Microsoft Entra
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,065 questions
{count} votes

Accepted answer
  1. Miguel Gonçalves 961 Reputation points
    2024-06-14T22:14:28.86+00:00

    Hi Rising Flight,

    Please note that New-MsolUser is used for creating a new user in Azure AD, not for inviting a guest user. You should use New-AzureADMSInvitation

    A Sample:

    |Invite the user:

    $inv = New-AzureADMSInvitation -InvitedUserEmailAddress "someone@domain.com" -InvitedUserDisplayName "FN LN" -SendInvitationMessage $true -InviteRedirectUrl <URL> -InvitedUserType "Guest"

    |Use this command to add the invited user to a group:

    Add-AzureADGroupMember -ObjectId <GroupObjectId> -RefObjectId $inv.InvitedUser.Id


    # If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Shweta Mathur 29,781 Reputation points Microsoft Employee
    2024-06-17T08:58:18.5366667+00:00

    Hi @Rising Flight

    Thanks for reaching out.

    About mail contacts, they are not the same as guest users in Entra ID. Mail contacts are used to represent external email addresses in Exchange Online, but they are not user accounts in Entra ID.

    If you want to invite an external user to collaborate with your organization using their own work, school, or social account, you should use the "Invite external user" option in the Azure portal or use the "New-AzureADMSInvitation" PowerShell cmdlet as described above.

    Reference - https://learn.microsoft.com/en-us/powershell/module/azuread/new-azureadmsinvitation?view=azureadps-2.0

    Hope this will help.

    Thanks,

    Shweta

    Please remember to "Accept Answer" if answer helped you.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.