SID - Use literal UPN value when attempting a user to SID lookup (#77334) (#77348)

(cherry picked from commit ff184b0815)
pull/77543/head
Jordan Borean 4 years ago committed by GitHub
parent db69d93c1c
commit 04afeffed7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- Ansible.ModuleUtils.SID - Use user principal name as is for lookup in the ``Convert-ToSID`` function - https://github.com/ansible/ansible/issues/77316

@ -44,10 +44,6 @@ Function Convert-ToSID {
$domain = $account_name_split[0]
}
$username = $account_name_split[1]
} elseif ($account_name -like "*@*") {
$account_name_split = $account_name -split "@"
$domain = $account_name_split[1]
$username = $account_name_split[0]
} else {
$domain = $null
$username = $account_name

Loading…
Cancel
Save