Skip to content
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

Missing @adParams for Rename-ADObject and Move-ADObject #54

Closed
kmschl2 opened this issue Jul 26, 2023 · 4 comments · Fixed by #61
Closed

Missing @adParams for Rename-ADObject and Move-ADObject #54

kmschl2 opened this issue Jul 26, 2023 · 4 comments · Fixed by #61

Comments

@kmschl2
Copy link

kmschl2 commented Jul 26, 2023

SUMMARY

Moving or Renaming Objects doesn't work as expected, specified dc is not used, auth should not be working (I guess)

ISSUE TYPE
  • Bug Report
COMPONENT NAME

_ADObject.psm1 used by all modules
Move-ADObejct and Rename-ADObject is missing @adParams

ANSIBLE VERSION
ansible [core 2.13.11]
  config file = 
  configured module search path = 
  ansible python module location = 
  ansible collection location = 
  executable location = 
  python version = 3.8.0 (default, Feb 28 2023, 16:22:29) [GCC 8.4.0]
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
Collection   Version
------------ -------
microsoft.ad 1.2.0
CONFIGURATION
not relevant
OS / ENVIRONMENT

not relevant

STEPS TO REPRODUCE
- microsoft.ad.group:
    domain_server: xyz
EXPECTED RESULTS

The Group is renamed/moved using the DC specified by domain_server

ACTUAL RESULTS

The Group is renamed/moved using the default DC of the server connected to
Leads to replcation delays etc.

@kmschl2
Copy link
Author

kmschl2 commented Aug 2, 2023

Ran into yet another problem, module is not using the same DC, when deleting ous. Get-ADObject is not using the proper params, subsequent calls to Set-ADObject or Remove-ADObject will fail.

It is really important to always use the same domain controller, when talking to AD. If not you will get "strange" unexpected results, because of replication delays.

@jborean93
Copy link
Collaborator

Thanks for the bug report and sorry for the delay, the PR #61 should fix up this issue.

Ran into yet another problem, module is not using the same DC, when deleting ous. Get-ADObject is not using the proper params, subsequent calls to Set-ADObject or Remove-ADObject will fail.

Is this related to the same missing splatted variables here or is it for something else? I just want to check if there is more that can be done here.

@kmschl2
Copy link
Author

kmschl2 commented Aug 7, 2023

Thanks for your answer. This is all related to the same missing splatted variables.
In the second case it is missing too, I think.

PR #61 fixes the Move-ADObject stuff, I guess, but I think you missed the one, where Get-ADObject is called before removing AccidentalDeletion when state is absent.

@jborean93
Copy link
Collaborator

PR #61 fixes the Move-ADObject stuff, I guess, but I think you missed the one, where Get-ADObject is called before removing AccidentalDeletion when state is absent.

Thanks for the pickup, just pushed a commit that adds that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants