Skip to content

Instantly share code, notes, and snippets.

@FH-Inway
Created November 15, 2023 17:19
Show Gist options
  • Save FH-Inway/aacb74f981eb157803f845407c7b5438 to your computer and use it in GitHub Desktop.
Save FH-Inway/aacb74f981eb157803f845407c7b5438 to your computer and use it in GitHub Desktop.
d365fo.integrations add role to user
$payload = Get-D365ODataEntityData -EntityName SecurityUserRoles -CrossCompany -Filter "UserId eq 'Guest'" -Verbose
$payload.SecurityRoleIdentifier = 'LedgerAccountant'
$payload.SecurityRoleName = 'Accountant'
$payloadNew = ConvertTo-Json $payload
Import-D365ODataEntity -EntityName SecurityUserRoles -CrossCompany -Payload $payloadNew -Verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment