Add Manager attribute support with automatic DN resolution to AD provider#175
Add Manager attribute support with automatic DN resolution to AD provider#175
Conversation
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
Added Manager DN resolution from multiple formats (GUID, UPN, sAMAccountName) in commit f22d998. The resolution logic mirrors IdentityKey behavior - it automatically detects the format and resolves to DN. Examples added to documentation showing all supported formats. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f22d99879a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Adds first-class Active Directory Manager attribute support to IdLE’s AD provider, including automatic resolution of common manager identifiers to a DN so CreateIdentity/EnsureAttribute can use the dedicated -Manager cmdlet parameters reliably.
Changes:
- Added Manager DN validation + resolution logic to the AD adapter, and wired
New-ADUser -Manager/Set-ADUser -Manager+ clear via-Clear manager. - Expanded AD user retrieval to include
Managerso current-value comparisons are possible. - Added Pester tests and updated provider docs with supported formats and examples.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/IdLE.Provider.AD/Private/New-IdleADAdapter.ps1 |
Adds TestManagerDN/ResolveManagerDN, includes Manager in query properties, and uses dedicated AD cmdlet parameters for set/clear. |
tests/Providers/ADIdentityProvider.Tests.ps1 |
Extends fake adapter + adds tests for setting/clearing/resolution scenarios. |
docs/reference/providers/provider-ad.md |
Documents Manager handling, supported formats, and examples including clearing with $null. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: blindzero <13959569+blindzero@users.noreply.github.com>
AD Provider: Manager attribute handling across CreateIdentity and EnsureAttribute
Changes Made
Added Manager Resolution (addressing @blindzero's comment #3779393462):
ResolveManagerDNmethod to AD adapterUpdated Documentation (addressing comment #2788349846):
$nullworks correctly in PSD1 filesFixed Test Naming (addressing bot review comment #2788491515):
Updated Tests:
Test Results
$nullworks correctlyOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.