-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADManagedServiceAccount: The Resource will Incorrectly have an Ensure state of 'Absent' if any of its 'PrincipalsAllowedToRetrieveManagedPassword' no longer exist #512
Labels
bug
The issue is a bug.
Comments
I'm working on a PR for this. |
johlju
added
bug
The issue is a bug.
help wanted
The issue is up for grabs for anyone in the community.
labels
Sep 25, 2019
This was referenced Oct 5, 2019
johlju
added
in progress
The issue is being actively worked on by someone.
and removed
help wanted
The issue is up for grabs for anyone in the community.
labels
Nov 2, 2019
johlju
pushed a commit
that referenced
this issue
Nov 2, 2019
…Property and Refactor (#517) - Changes to ADManagedServiceAccount - KerberosEncryptionType property added (issue #511). - BREAKING CHANGE: AccountType parameter ValidateSet changed from ('Group', 'Single') to ('Group', 'Standalone') - Standalone is the correct terminology (issue #515). - BREAKING CHANGE: AccountType parameter default of Single removed. - Enforce positive choice of account type. - BREAKING CHANGE: MembershipAttribute parameter ValidateSet member SID changed to ObjectSid to match result property of Get-AdObject. Previous code does not work if SID is specified. - BREAKING CHANGE: AccountTypeForce parameter removed - unnecessary complication. - BREAKING CHANGE: Members parameter renamed to ManagedPasswordPrincipals - to closer match Get-AdServiceAccount result property PrincipalsAllowedToRetrieveManagedPassword. This is so that a DelegateToAccountPrincipals parameter can be added later. - Common Compare-ResourcePropertyState function used to replace function specific Compare-TargetResourceState and code refactored (issue #512). - Resource unit tests refactored to use nested contexts and follow the logic of the module. - Resource Integration tests added.
X-Guardian
added a commit
that referenced
this issue
Jan 10, 2020
…Property and Refactor (#517) - Changes to ADManagedServiceAccount - KerberosEncryptionType property added (issue #511). - BREAKING CHANGE: AccountType parameter ValidateSet changed from ('Group', 'Single') to ('Group', 'Standalone') - Standalone is the correct terminology (issue #515). - BREAKING CHANGE: AccountType parameter default of Single removed. - Enforce positive choice of account type. - BREAKING CHANGE: MembershipAttribute parameter ValidateSet member SID changed to ObjectSid to match result property of Get-AdObject. Previous code does not work if SID is specified. - BREAKING CHANGE: AccountTypeForce parameter removed - unnecessary complication. - BREAKING CHANGE: Members parameter renamed to ManagedPasswordPrincipals - to closer match Get-AdServiceAccount result property PrincipalsAllowedToRetrieveManagedPassword. This is so that a DelegateToAccountPrincipals parameter can be added later. - Common Compare-ResourcePropertyState function used to replace function specific Compare-TargetResourceState and code refactored (issue #512). - Resource unit tests refactored to use nested contexts and follow the logic of the module. - Resource Integration tests added.
johlju
pushed a commit
to johlju/ActiveDirectoryDsc
that referenced
this issue
Jan 10, 2020
…Property and Refactor (dsccommunity#517) - Changes to ADManagedServiceAccount - KerberosEncryptionType property added (issue dsccommunity#511). - BREAKING CHANGE: AccountType parameter ValidateSet changed from ('Group', 'Single') to ('Group', 'Standalone') - Standalone is the correct terminology (issue dsccommunity#515). - BREAKING CHANGE: AccountType parameter default of Single removed. - Enforce positive choice of account type. - BREAKING CHANGE: MembershipAttribute parameter ValidateSet member SID changed to ObjectSid to match result property of Get-AdObject. Previous code does not work if SID is specified. - BREAKING CHANGE: AccountTypeForce parameter removed - unnecessary complication. - BREAKING CHANGE: Members parameter renamed to ManagedPasswordPrincipals - to closer match Get-AdServiceAccount result property PrincipalsAllowedToRetrieveManagedPassword. This is so that a DelegateToAccountPrincipals parameter can be added later. - Common Compare-ResourcePropertyState function used to replace function specific Compare-TargetResourceState and code refactored (issue dsccommunity#512). - Resource unit tests refactored to use nested contexts and follow the logic of the module. - Resource Integration tests added.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Details of the scenario you tried and the problem that is occurring
For an
ADManagedServiceAccount
resource , if any of thePrincipalsAllowedToRetrieveManagedPassword
identities on a Group Managed Service Account no longer exist. (A server is decommissioned for example), theGet-TargetResource
function will return anEnsure
state ofAbsent
for the whole resource. This will cause the LCM to attempt to create the account again, and produce an error as the account already exists.Verbose logs showing the problem
Suggested solution to the issue
There is currently a single try/catch block around all the code in the
Get-TargetResource
function, which is catching errors from bothGet-ADObjectParentDN
as well asGet-ADObject
. There should be separate try/catch blocks around each of these functions, with appropriate error handling for each one.The DSC configuration that is used to reproduce the issue (as detailed as possible)
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used ('dev' if using current dev branch)
4.0.0.0
The text was updated successfully, but these errors were encountered: