- Full read-through of
Okta.psm1(~5100 lines) - Identified 15 bugs in Round 1 review
- Created task list (Tasks #1–#15)
- Fixed 14 of 15 tasks (Task #13 confirmed intentional by user)
- Conducted second review pass
- Identified 10 additional issues (Round 2: A–J)
- User asked for a planning-with-files writeup — creating these files now
- Task #13 (
$afteras[datetime]): User confirmed this is intentional. Left as-is. oktaActivateFactorByUsermerge strategy: uid/username optional, fid mandatory, passCode optional 5–20 chars
C:\workspace\Okta-PSModule\Okta.psm1— 14 bug fixes applied
task_plan.mdfindings.mdprogress.md
All 10 Round 2 issues (A–J) resolved. See task_plan.md Phase 4 for full list.
Notable changes:
oktaAdminExpirePasswordbyID: parameter changed from[string]$tempPasswordto[switch]$returnTempPasswordoktaCreateZone: now accepts$gatewaysand$proxiesarray parametersoktaGetLogs: now delegates tooktaListLogs(no duplicate logic)oktaListLogs: gained$q,$after, and[alias("sortOrder")]on the$orderparam
None known. Review and test authoring complete.
- Added 6 Group Rules API functions to
Okta.psm1:oktaGetGroupRuleById,oktaCreateGroupRule,oktaUpdateGroupRule,oktaDeleteGroupRule,oktaActivateGroupRule,oktaDeactivateGroupRule - Added read-only Group Rules section to
tests/Integration.Tests.ps1(list all rules, get by ID — skips gracefully if prev org has no rules) - Created
tests/GroupRule.Tests.ps1— full end-to-end write test suite: BeforeAll creates a disposable group + rule; AfterAll deletes both. Covers: GetById, List, Update (rename while INACTIVE), Activate, Deactivate.
Okta.psm1— 6 new functions added before Export-ModuleMembertests/Integration.Tests.ps1— Group Rules read-only section addedtests/GroupRule.Tests.ps1— new write/lifecycle test suite
- Validated
prevorg API token active (HTTP 200, orgsentinelone-preview, statusACTIVE) - Discovered fixture IDs via live API calls to
prevorg - Updated
tests/TestConfig.psd1with confirmedprevfixture values - Created
tests/Unit.Tests.ps1— Pester 5 pure unit tests (no API):oktaNewPassword: length, charset, complexity, missing-x regressionoktaRandLower: length, lowercase-only, missing-x regressionoktaExternalIdtoGUID: round-trip and error caseoktaProcessHeaderLink: single, comma-separated, string array, and empty inputsoktaBuildURIQuery: single param, multiple params, return type
- Created
tests/Integration.Tests.ps1— Pester 5 read-only integration tests (usesprevorg):- Users:
oktaGetUserbyID(by ID, by login),oktaGetprofilebyId,oktaListUsers(limit, q search),oktaGetGroupsbyUserId,oktaGetAppsbyUserId - Groups:
oktaGetGroupbyId,oktaGetGroupStatsbyId,oktaGetGroupMembersbyId,oktaListGroups(list, query filter) - Apps:
oktaGetAppbyId,oktaGetAppGroups,oktaListApps(list, ACTIVE filter),oktaGetAppLinksbyUserId - Logs:
oktaListLogs(limit, sortOrder),oktaGetLogs(datetime wrapper) - Devices:
oktaGetDevices(no-throw)
- Users:
| Field | Value |
|---|---|
| OrgAlias | prev |
| KnownUserId | 00u1fcu6ofGaouXrO1d7 |
| KnownUserLogin | darlene.smith@test.sentinelone.dev |
| KnownGroupId | 00g2xhsyqcxSNqvQ91d7 (ContingentProcessing) |
| KnownAppId | 0oa1e0scxcfZCJlXB1d7 (Okta Admin Console/saasure) |
| KnownAppGroupId | 00ghddtvit6Dcn3YB1d7 |
tests/TestConfig.psd1— updated withprevfixture valuestests/Unit.Tests.ps1— created (pure unit tests)tests/Integration.Tests.ps1— created (read-only API integration tests)