Exam AZ-104 All QuestionsBrowse all questions from this exam
Question 38

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

You have an Azure Active Directory (Azure AD) tenant named contoso.com.

You have a CSV file that contains the names and email addresses of 500 external users.

You need to create a guest user account in contoso.com for each of the 500 external users.

Solution: You create a PowerShell script that runs the New-AzureADUser cmdlet for each user.

Does this meet the goal?

    Correct Answer: B

    The New-AzureADUser cmdlet is used to create new user accounts within an organization's Azure Active Directory (Azure AD). However, to create guest user accounts for external users, you should use the New-AzureADMSInvitation cmdlet, which is designed to invite external users to your directory. The New-AzureADMSInvitation cmdlet sends an invitation to the external user, allowing them to join the Azure AD tenant as a guest user. Therefore, using New-AzureADUser does not meet the goal of creating guest user accounts for the 500 external users.

Discussion
NaoVazOption: B

"New-AzureADUser" is for creating new Azure AD users not inviting Guests. https://www.examtopics.com/exams/microsoft/az-104/view/4/ To invite using Powershell one should use the "New-AzureADMSInvitation" cmdlet. (https://docs.microsoft.com/en-us/powershell/module/azuread/new-azureadmsinvitation?view=azureadps-2.0)

Mev4953Option: B

#Read external users from CSV file $GuestUsers = Import-CSV "C:\Temp\GuestUsers.csv" $i = 0; $TotalUsers = $GuestUsers.Count #Iterate users and send guest invite one by one Foreach($GuestUser in $GuestUsers) { $GuestUserName = $GuestUser.'UserName' $GuestUserEmail = $GuestUser.'EmailAddress' $i++; Write-Progress -activity "Processing $GuestUserName - $GuestUserEmail" -status "$i out of $TotalUsers completed" Try { #Send invite $InviteResult = New-AzureADMSInvitation -InvitedUserDisplayName $GuestUserName -InvitedUserEmailAddress $GuestUserEmail -InviteRedirectURL https://myapps.microsoft.com -SendInvitationMessage $true Write-Host "Invitation sent to $GuestUserName ($GuestUserEmail)" -f Green } catch { Write-Host "Error occurred for $GuestUserName ($GuestUserEmail)" -f Yellow Write-Host $_ -f Red } }

Mev4953

Create with invitation could be better option. You can also create new user with "New-AzureADUser". But i am not sure about yes or not. there is no issue about "invitation". It is about "need to create" guest users. If you have better explanation, I am looking forward to it :)

jackdryan

B is correct

18c2076

no sht sherlock

DH333

Finished the exam today with 837 points and this question was asked. About 70% of the questions were from here brothers - keep studying and you will make it!

PakawatOption: A

I just passed, Q was the exam 3 Jul 2023.

Kr1s

Q was in exam 29th July 2023

JoskeVr

This was on my exam 25/02/2024!

RamaKrishnaPOption: B

https://learn.microsoft.com/en-us/azure/active-directory/external-identities/bulk-invite-powershell "New-AzureADMSInvitation" command

tashakoriOption: B

No is right

mojo86Option: A

A is correct if used with the -UserType "Guest" parameter. The New-AzureADUser cmdlet is used in Azure Active Directory (Azure AD) to create a new user account. The -UserType "Guest" parameter specifies that the new user should be created as a guest user. Guest users are typically users from outside the Azure AD organization, such as partners or customers, who need access to resources within the organization. Creating a guest user allows you to grant them access to specific resources without requiring them to be a member of your organization's Azure AD directory.

photon99Option: A

New-AzureADMSInvitation is realted to Azure AD Powershell, why its included in AZ 104?

Nico1973Option: B

Answer: B. No Explanation: Running the New-AzureADUser cmdlet in PowerShell does not directly create guest user accounts in an Azure AD tenant. The New-AzureADUser cmdlet is typically used to create new user accounts within the organization's Azure AD, not for creating guest user accounts for external users. To achieve the goal of creating guest user accounts for the 500 external users in contoso.com, a different approach or command should be used, such as inviting external users as guests using the appropriate Azure AD cmdlets or methods.

7658b84Option: B

For EntraID, the powershell command is New-MgInvitation. https://learn.microsoft.com/en-us/entra/external-id/bulk-invite-powershell

30thOption: A

I am not sure about B. According to the task the account must be created user "in contoso.com". Invited users won't be a real members of contoso.com domain. Users are invited with their own E-Mails.

Saurabh_BhargavOption: B

B is correct

AZ764Option: B

Guests are not the same as external users. Answer is correct.

james2033Option: B

New-AzureADMSInvitation https://learn.microsoft.com/en-us/azure/active-directory/external-identities/bulk-invite-powershell#send-bulk-invitations

kodathedogOption: B

Microsoft's solution: https://learn.microsoft.com/en-us/azure/active-directory/external-identities/bulk-invite-powershell