Merge: Scheduler + Welcome DOCX integration (0.1.7) (MSOLUM-2)
Discarded
Stapel Dev opened 4 months ago

Summary

  • Integrates CSV scheduler tooling and Welcome DOCX generation into a single branch.
  • Reorganizes README to surface “Templates” under Input Files and restores key guidance sections.

Changes

  • Scripts
    • Added scheduler:
      • scripts/schedule-onboard.ps1
      • scripts/schedule-offboard.ps1
      • scripts/schedule-tenants.ps1
    • Welcome document:
      • scripts/generate-welcome.ps1
      • modules/onboard.psm1: captures temp password, resolves ManagerName via ManagerUPN, and invokes generator.
      • scripts/onboard.ps1: -GenerateWelcome, -WelcomeTemplatePath, -WelcomeOutputDir documented and supported.
  • Config and examples
    • config/example.appsettings.json: includes DefaultWelcomeTemplatePath, DefaultWelcomeOutputDir, scheduler settings, and other defaults.
    • config/example.tenants.json: example tenants list for scheduler.
    • input/example-onboard.csv: unified schema shows both scheduler fields and welcome flag:
      • Header: UserPrincipalName, DisplayName, GivenName, Surname, JobTitle, Department, Office, SiteCode, ManagerUPN, Country, UsageLocation, LicenseProfile, GroupProfile, ExtraGroups, OnboardDate, ProcessedOnboard, ProcessedOnboardAt, GenerateWelcome
      • Two sample rows (one with GenerateWelcome=true; one blank).
    • input/example-sites.csv: includes SiteEmail.
    • config/welcome-template.txt: sample text to copy into a DOCX template.
  • Documentation
    • README.md
      • Reorganized: new “Templates” section under “Input files” with “Out-of-Office (OOO) templates” and “Welcome document (DOCX)”.
      • Restored “Service providers: authorize your app for multiple tenants”.
      • Restored and expanded “App settings reference (appsettings.json)” including Welcome and Scheduler settings.
      • Moved FAQ to just before Troubleshooting; verified TOC anchors.
    • CHANGELOG.md
      • Added 0.1.7 entry covering both features and docs polish.

Behavioral Details

  • Welcome document generation
    • CLI: -GenerateWelcome (batch or single), optional -WelcomeTemplatePath, -WelcomeOutputDir.
    • CSV: per-row GenerateWelcome true/yes/1 triggers generation.
    • Onboarding auto-injects generated temp password () and resolves from ManagerUPN via Graph.
    • Template replacement runs on word/document.xml; sample text template provided at config/welcome-template.txt for content drafting.
  • Scheduler
    • CSV-driven runs for onboarding and offboarding via schedule-*.ps1 scripts.
    • Tenants runner script for partner scenarios, with config/example.tenants.json sample.

Security and Logging

  • Temp password is not logged unless Logging.LogTempPasswords=true (default false).
  • Generated welcome DOCX includes the temp password by design; advise restricting output directory permissions.
  • No new elevated permissions beyond what onboarding/offboarding already require.

Breaking Changes

  • None expected to existing flows.
  • CSV headers extended for onboarding sample; backward compatibility remains for user-provided CSVs.

Migration Notes

  • If using older example CSVs, consider adding GenerateWelcome, SiteEmail in Sites CSV, and (for scheduler) OnboardDate/Processed* fields as applicable.
  • Confirm config/appsettings.json in your environment; defaults may cover most cases.

Testing Notes

  • Onboarding (WhatIf):
    • pwsh scripts/onboard.ps1 -UserCsv ./input/example-onboard.csv -SitesCsv ./input/example-sites.csv -GenerateWelcome -WhatIf
  • Scheduler (WhatIf):
    • pwsh scripts/schedule-onboard.ps1 -WhatIf
    • pwsh scripts/schedule-offboard.ps1 -WhatIf
    • pwsh scripts/schedule-tenants.ps1 -WhatIf
  • Offboarding (WhatIf):
    • pwsh scripts/offboard.ps1 -UserCsv ./input/example-offboard.csv -WhatIf
This pull request has been discarded
pull request 1/1
Submitter Stapel Dev
Target master
Source merge/features-scheduler-welcome
Assignees
Merge Strategy
Create Merge Commit
Watchers (1)
Reference
pull request MSOLUM-2
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover