Skip to content

Commit

Permalink
SID - Use literal UPN value when attempting a user to SID lookup (ans…
Browse files Browse the repository at this point in the history
…ible#77334)

(cherry picked from commit ff184b0)
  • Loading branch information
jborean93 committed Mar 24, 2022
1 parent 36be99b commit 6c53aff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/ModuleUtils.SID-long-username.yml
@@ -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
Expand Up @@ -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
Expand Down

0 comments on commit 6c53aff

Please sign in to comment.