-
-
Notifications
You must be signed in to change notification settings - Fork 13
Add FscmUserFromSecurityGroup
Enables creation of users from an Entra Security Group in the Dynamics 365 ERP environment.
Add-FscmUserFromSecurityGroup [-EnvironmentId] <String> [-SecurityGroup] <String> [[-Role] <String>]
[-RemapExisting] [-ProgressAction <ActionPreference>] [<CommonParameters>]
This cmdlet creates users in the specified Dynamics 365 ERP environment based on the members of an Entra Security Group.
It will also assign the created users to a specified security role in the Dynamics 365 ERP environment.
Add-FscmUserFromSecurityGroup -EnvironmentId "env-123" -SecurityGroup "Contoso Sales Team" -Role "Sales Clerk"
This will create users in the environment with the id "env-123" based on the members of the Entra Security Group "Contoso Sales Team" and assign them to the "Sales Clerk" security role. It will validate users based on their UPN, and if a user is not found but a user with the same UserId exists, it will skip the user.
Add-FscmUserFromSecurityGroup -EnvironmentId "env-123" -SecurityGroup "Contoso Sales Team" -Role "Sales Clerk" -RemapExisting
This will create users in the environment with the id "env-123" based on the members of the Entra Security Group "Contoso Sales Team" and assign them to the "Sales Clerk" security role. It will validate users based on their UPN, and if a user is not found but a user with the same UserId exists, it will remap the existing user to the new UPN and assign the specified security role.
The id of the environment that you want to work against.
Can be either the environment name, the environment GUID (PPAC) or the LCS environment ID.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe name or ID of the Entra Security Group from which to create users.
Type: String
Parameter Sets: (All)
Aliases: EntraGroup
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe security role to assign to the created users.
Type: String
Parameter Sets: (All)
Aliases: RoleName
Required: False
Position: 3
Default value: System user
Accept pipeline input: False
Accept wildcard characters: FalseInstructs the function to remap existing users to the specified security role.
If a user from the Security Group is not found in the Dynamics 365 ERP environment based on the UPN, but a user with the same UserId exists, the function will - by default - skip the user.
If this switch is used, it will remap the existing user to the new UPN and assign the specified security role.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Author: Mötz Jensen (@Splaxi)