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

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-AzureADMSInvitation cmdlet for each external user.

Does this meet the goal?

    Correct Answer: A

    The New-AzureADMSInvitation cmdlet in PowerShell is designed specifically for inviting external users to an Azure Active Directory as guest users. For each entry in the CSV file, you can run this cmdlet, providing the necessary parameters such as the user's email address and other optional information. This approach will fulfill the goal of creating a guest user account in the Azure AD tenant for each of the 500 external users.

Discussion
shadadOption: B

I took Exam of Azure- 104 at 27/2/2023 I score 920 points out of 1000 points. This was on it and my answer was: B Finding answer with high vote is not enough on Examtopics site. this one is example, the command is correct but the CSV file contents you will use with New-AzureADMSInvitation is wrong! so be careful. CSV Must contain Both : - Email address to invite - the user who will receive an invitation - Redirection url - the URL to which the invited user is forwarded after accepting the invitation. https://learn.microsoft.com/en-us/azure/active-directory/external-identities/tutorial-bulk-invite

obaali1990

You had it wrong. It should be A. If you had chosen A, you might have gotten more than 920 marks you probably had. Anyway, congratulations!

poopy_ballz

Technically, you don't need a redirection URL for this to work. The guest will still receive the invite on it's own.

shadad

He will get the invitation. but will direct him to where?!!! thats why you need the URL also. you try it and let me know :)

Abiram

I tried this scenario, and it works using the PowerShell script. That foreach loop kind of solves the requirement to send email for each user. I think "Yes" is the right answer. Anyway, Congratulations on passing the exam with an outstanding score!!

chucklu

You are right, but should give the documentation of command https://learn.microsoft.com/en-us/powershell/module/azuread/new-azureadmsinvitation?view=azureadps-2.0 for New-AzureADMSInvitation command, the -InviteRedirectUrl <String> parameter is required, whose value is not provided in question.

abcduioOption: A

i use this script almost every day, i think what this question is asking the main command to use for creating guest users. it didn't say that other commands are not necessary, depends how you read it, it could be wrong or right. but i will still choose A for this question. Below is my script. foreach ($email in $invitations) {New-AzureADMSInvitation ` -InvitedUserEmailAddress $email.InvitedUserEmailAddress ` -InvitedUserDisplayName $email.Name ` -InviteRedirectUrl https://myapps.microsoft.com ` -InvitedUserMessageInfo $messageInfo ` -SendInvitationMessage $true }

xRiot007

Spot on. People forget that the redirect URL can simply be passed as a param.

MelKrOption: A

Current documentation is using the new Graph Powershell-Command "New-MgInvitation": https://learn.microsoft.com/en-us/entra/external-id/bulk-invite-powershell. Everything else still applies. So A would be valid for new command as well. The question may be updated after October 26, 2023.

carlosFSOption: A

A CORRECTA CSV FOR POWERSHELL : In Microsoft Excel, create a CSV file with the list of invitee user names and email addresses. Make sure to include the "Name" and "InvitedUserEmailAddress" column headings. CSV FOR PORTAL:Required values are: "Email address to invite" - the user who will receive an invitation "Redirection url" - the URL to which the invited user is forwarded after accepting the invitation. I

Vanilla007Option: A

I think redirection URL is mandatory if we are doing it via Azure portal. But in this question it is asking to pass a ps command. SO I think the solution meets the requirement and the answer is A

pattj2Option: A

A is the correct answer. https://learn.microsoft.com/en-us/azure/active-directory/external-identities/bulk-invite-powershell

3c5adceOption: A

I used ChatGPT to confirm - the answer is A: Yes, using the New-AzureADMSInvitation cmdlet in a PowerShell script to invite each external user from the CSV file would meet the goal of creating a guest user account in the contoso.com Azure AD tenant for each external user. This cmdlet is specifically designed for inviting external users to an Azure AD tenant as guests, making it suitable for this scenario.

Amir1909Option: A

Yes is correct

Samuel77Option: A

This is correct

AMEHAROption: A

New-AzureADMSInvitation is correct command https://learn.microsoft.com/en-us/powershell/module/azuread/new-azureadmsinvitation?view=azureadps-2.0 . For the Bulk user foreach ($email in $invitations) {New-AzureADMSInvitation ` -InvitedUserEmailAddress $email.InvitedUserEmailAddress ` -InvitedUserDisplayName $email.Name ` -InviteRedirectUrl https://myapps.microsoft.com ` -InvitedUserMessageInfo $messageInfo ` -SendInvitationMessage $true }

GoldenDisciple2Option: A

Reading through the comments to see if there is any good discussions. I see in the documentation, when running the New-AzureADMSInvitation that you'll have to put a -InviteRedirectURL parameter in the command so I feel that should be sufficient even though the CSV file doesn't contain the appropriate fields therefor I say it's yes. A

james2033Option: A

We can use PowerShell for invite a list of users (even use CSV file), see https://learn.microsoft.com/en-us/azure/active-directory/external-identities/bulk-invite-powershell#send-bulk-invitations .

dhivyamohanbabuOption: A

Correct answer A

jersonmartinezOption: A

Es necesario que el archivo CSV contenga los valores necesarios para los parámetros que se utilizan en la función New-AzureADMSInvitation. En este caso, los valores requeridos son -InvitedUserEmailAddress y -InvitedUserDisplayName. Por lo tanto, si tu archivo CSV solo contiene estas dos columnas, el script debería funcionar correctamente siempre y cuando se mantenga el formato correcto. Sin embargo, si faltan algunos de estos campos, la función New-AzureADMSInvitation no tendrá la información necesaria para enviar la invitación correctamente. Es importante asegurarse de que el archivo CSV tenga el formato correcto y que contenga todos los campos requeridos antes de ejecutar el script para evitar errores y asegurarse de que todas las invitaciones se envíen correctamente.

cvalladares123Option: B

Answer should be B) No - Check the following document: https://learn.microsoft.com/en-us/azure/active-directory/external-identities/bulk-invite-powershell - "Send bulk invitations" -> "The script sends an invitation to the email addresses in the Invitations.csv file" - While the question states that the cmdlet should be used once per user, Microsoft documentation states that it should be done once as the comand releases invitations for addresses in .CSV File

fimbulvetrkOption: B

this seems to be an outdated question because you can simply have the option to bulk invite guest users which (at least in my opinion) is much simpler than scripting in powershell

garmatey

another option doesnt mean this solution doesnt also work

MadboOption: B

The correct answer to the question is B - No, using the New-AzureADMSInvitation cmdlet does not meet the goal of creating a guest user account in contoso.com for each of the 500 external users.