[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75Q1GJSESN4JDYYK514W54X":3,"skill-same:01M75Q1GJSESN4JDYYK514W54X":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M75Q1GJSESN4JDYYK514W54X","ms365-tenant-manager",null,"Microsoft 365 tenant administration for Global Administrators. Automate M365 tenant setup, Office 365 admin tasks, Azure AD user management, Exchange Online configuration, Teams administration, and security policies. Generate PowerShell scripts for bulk operations, Conditional Access policies, license management, and compliance reporting. Use for M365 tenant manager, Office 365 admin, Azure AD users, Global Administrator, tenant configuration, or Microsoft 365 automation.","TehutiRaEl\u002FTHEHIVE","TehutiRaEl","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F267495122?v=4","01M75N1QQQHT359S3XMYK7NPCB","01M75N1QRAW5P8P43HEHWMXCTE",0,"MIT","https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills-library\u002Fengineering-team\u002Fskills\u002Fms365-tenant-manager\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: \"ms365-tenant-manager\"\ndescription: Microsoft 365 tenant administration for Global Administrators. Automate M365 tenant setup, Office 365 admin tasks, Azure AD user management, Exchange Online configuration, Teams administration, and security policies. Generate PowerShell scripts for bulk operations, Conditional Access policies, license management, and compliance reporting. Use for M365 tenant manager, Office 365 admin, Azure AD users, Global Administrator, tenant configuration, or Microsoft 365 automation.\n---\n\n# Microsoft 365 Tenant Manager\n\nExpert guidance and automation for Microsoft 365 Global Administrators managing tenant setup, user lifecycle, security policies, and organizational optimization.\n\n---\n\n## Quick Start\n\n### Run a Security Audit\n\n```powershell\nConnect-MgGraph -Scopes \"Directory.Read.All\",\"Policy.Read.All\",\"AuditLog.Read.All\"\nGet-MgSubscribedSku | Select-Object SkuPartNumber, ConsumedUnits, @{N=\"Total\";E={$_.PrepaidUnits.Enabled}}\nGet-MgPolicyAuthorizationPolicy | Select-Object AllowInvitesFrom, DefaultUserRolePermissions\n```\n\n### Bulk Provision Users from CSV\n\n```powershell\n# CSV columns: DisplayName, UserPrincipalName, Department, LicenseSku\nImport-Csv .\\new_users.csv | ForEach-Object {\n    $passwordProfile = @{ Password = (New-Guid).ToString().Substring(0,16) + \"!\"; ForceChangePasswordNextSignIn = $true }\n    New-MgUser -DisplayName $_.DisplayName -UserPrincipalName $_.UserPrincipalName `\n               -Department $_.Department -AccountEnabled -PasswordProfile $passwordProfile\n}\n```\n\n### Create a Conditional Access Policy (MFA for Admins)\n\n```powershell\n$adminRoles = (Get-MgDirectoryRole | Where-Object { $_.DisplayName -match \"Admin\" }).Id\n$policy = @{\n    DisplayName = \"Require MFA for Admins\"\n    State = \"enabledForReportingButNotEnforced\"   # Start in report-only mode\n    Conditions = @{ Users = @{ IncludeRoles = $adminRoles } }\n    GrantControls = @{ Operator = \"OR\"; BuiltInControls = @(\"mfa\") }\n}\nNew-MgIdentityConditionalAccessPolicy -BodyParameter $policy\n```\n\n### Bundled Python Generators\n\nThree stdlib tools generate the PowerShell artifacts deterministically — prefer them over hand-writing scripts for bulk\u002Frepeatable work. Sample input: `sample_input.json`; expected shape: `expected_output.json`.\n\n```bash\n# Tenant setup: checklist + DNS records + license plan (JSON), or the full setup script\npython3 scripts\u002Ftenant_setup.py --config sample_input.json --format json -o tenant_plan.json\npython3 scripts\u002Ftenant_setup.py --config sample_input.json --format powershell -o tenant_setup.ps1\n\n# User lifecycle: validate first, then generate creation\u002Foffboarding scripts\npython3 scripts\u002Fuser_management.py --domain acme.com --action validate --users users.json\npython3 scripts\u002Fuser_management.py --domain acme.com --action create --users users.json -o create_users.ps1\npython3 scripts\u002Fuser_management.py --domain acme.com --action offboard --user-email jane@acme.com -o offboard.ps1\n\n# Admin scripts: CA policy \u002F security audit \u002F bulk licensing\npython3 scripts\u002Fpowershell_generator.py --tenant-domain acme.com --task conditional-access --policy-config policy.json -o ca_policy.ps1\npython3 scripts\u002Fpowershell_generator.py --tenant-domain acme.com --task security-audit -o audit.ps1\npython3 scripts\u002Fpowershell_generator.py --tenant-domain acme.com --task bulk-license --users-csv users.csv --license-sku ENTERPRISEPACK -o licenses.ps1\n```\n\n**Gate:** for user creation, run `--action validate` first and require every entry to report `\"is_valid\": true` before generating the creation script. Review every generated `.ps1` against the workflows below before running it in the tenant.\n\n---\n\n## Workflows\n\n### Workflow 1: New Tenant Setup\n\n**Step 1: Generate Setup Checklist**\n\nRun `python3 scripts\u002Ftenant_setup.py --config tenant.json --format json` and work through `setup_checklist` phase by phase; `dns_records` feeds Step 2 and `license_recommendations` feeds the licensing workflow.\n\nConfirm prerequisites before provisioning:\n- Global Admin account created and secured with MFA\n- Custom domain purchased and accessible for DNS edits\n- License SKUs confirmed (E3 vs E5 feature requirements noted)\n\n**Step 2: Configure and Verify DNS Records**\n\n```powershell\n# After adding the domain in the M365 admin center, verify propagation before proceeding\n$domain = \"company.com\"\nResolve-DnsName -Name \"_msdcs.$domain\" -Type NS -ErrorAction SilentlyContinue\n# Also run from a shell prompt:\n# nslookup -type=MX company.com\n# nslookup -type=TXT company.com   # confirm SPF record\n```\n\nWait for DNS propagation (up to 48 h) before bulk user creation.\n\n**Step 3: Apply Security Baseline**\n\n```powershell\n# Disable legacy authentication (blocks Basic Auth protocols)\n$policy = @{\n    DisplayName = \"Block Legacy Authentication\"\n    State = \"enabled\"\n    Conditions = @{ ClientAppTypes = @(\"exchangeActiveSync\",\"other\") }\n    GrantControls = @{ Operator = \"OR\"; BuiltInControls = @(\"block\") }\n}\nNew-MgIdentityConditionalAccessPolicy -BodyParameter $policy\n\n# Enable unified audit log\nSet-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $true\n```\n\n**Step 4: Provision Users**\n\n```powershell\n$licenseSku = (Get-MgSubscribedSku | Where-Object { $_.SkuPartNumber -eq \"ENTERPRISEPACK\" }).SkuId\n\nImport-Csv .\\employees.csv | ForEach-Object {\n    try {\n        $user = New-MgUser -DisplayName $_.DisplayName -UserPrincipalName $_.UserPrincipalName `\n                           -AccountEnabled -PasswordProfile @{ Password = (New-Guid).ToString().Substring(0,12)+\"!\"; ForceChangePasswordNextSignIn = $true }\n        Set-MgUserLicense -UserId $user.Id -AddLicenses @(@{ SkuId = $licenseSku }) -RemoveLicenses @()\n        Write-Host \"Provisioned: $($_.UserPrincipalName)\"\n    } catch {\n        Write-Warning \"Failed $($_.UserPrincipalName): $_\"\n    }\n}\n```\n\n**Validation:** Spot-check 3–5 accounts in the M365 admin portal; confirm licenses show \"Active.\"\n\n---\n\n### Workflow 2: Security Hardening\n\n**Step 1: Run Security Audit**\n\n```powershell\nConnect-MgGraph -Scopes \"Directory.Read.All\",\"Policy.Read.All\",\"AuditLog.Read.All\",\"Reports.Read.All\"\n\n# Export Conditional Access policy inventory\nGet-MgIdentityConditionalAccessPolicy | Select-Object DisplayName, State |\n    Export-Csv .\\ca_policies.csv -NoTypeInformation\n\n# Find accounts without MFA registered\n$report = Get-MgReportAuthenticationMethodUserRegistrationDetail\n$report | Where-Object { -not $_.IsMfaRegistered } |\n    Select-Object UserPrincipalName, IsMfaRegistered |\n    Export-Csv .\\no_mfa_users.csv -NoTypeInformation\n\nWrite-Host \"Audit complete. Review ca_policies.csv and no_mfa_users.csv.\"\n```\n\n**Step 2: Create MFA Policy (report-only first)**\n\n```powershell\n$policy = @{\n    DisplayName = \"Require MFA All Users\"\n    State = \"enabledForReportingButNotEnforced\"\n    Conditions = @{ Users = @{ IncludeUsers = @(\"All\") } }\n    GrantControls = @{ Operator = \"OR\"; BuiltInControls = @(\"mfa\") }\n}\nNew-MgIdentityConditionalAccessPolicy -BodyParameter $policy\n```\n\n**Validation:** After 48 h, review Sign-in logs in Entra ID; confirm expected users would be challenged, then change `State` to `\"enabled\"`.\n\n**Step 3: Review Secure Score**\n\n```powershell\n# Retrieve current Secure Score and top improvement actions\nGet-MgSecuritySecureScore -Top 1 | Select-Object CurrentScore, MaxScore, ActiveUserCount\nGet-MgSecuritySecureScoreControlProfile | Sort-Object -Property ActionType |\n    Select-Object Title, ImplementationStatus, MaxScore | Format-Table -AutoSize\n```\n\n---\n\n### Workflow 3: User Offboarding\n\n**Step 1: Block Sign-in and Revoke Sessions**\n\n```powershell\n$upn = \"departing.user@company.com\"\n$user = Get-MgUser -Filter \"userPrincipalName eq '$upn'\"\n\n# Block sign-in immediately\nUpdate-MgUser -UserId $user.Id -AccountEnabled:$false\n\n# Revoke all active tokens\nInvoke-MgInvalidateAllUserRefreshToken -UserId $user.Id\nWrite-Host \"Sign-in blocked and sessions revoked for $upn\"\n```\n\n**Step 2: Preview with -WhatIf (license removal)**\n\n```powershell\n# Identify assigned licenses\n$licenses = (Get-MgUserLicenseDetail -UserId $user.Id).SkuId\n\n# Dry-run: print what would be removed\n$licenses | ForEach-Object { Write-Host \"[WhatIf] Would remove SKU: $_\" }\n```\n\n**Step 3: Execute Offboarding**\n\n```powershell\n# Remove licenses\nSet-MgUserLicense -UserId $user.Id -AddLicenses @() -RemoveLicenses $licenses\n\n# Convert mailbox to shared (requires ExchangeOnlineManagement module)\nSet-Mailbox -Identity $upn -Type Shared\n\n# Remove from all groups\nGet-MgUserMemberOf -UserId $user.Id | ForEach-Object {\n    try { Remove-MgGroupMemberByRef -GroupId $_.Id -DirectoryObjectId $user.Id } catch {}\n}\nWrite-Host \"Offboarding complete for $upn\"\n```\n\n**Validation:** Confirm in the M365 admin portal that the account shows \"Blocked,\" has no active licenses, and the mailbox type is \"Shared.\"\n\n---\n\n## Best Practices\n\n### Tenant Setup\n\n1. Enable MFA before adding users\n2. Configure named locations for Conditional Access\n3. Use separate admin accounts with PIM\n4. Verify custom domains (and DNS propagation) before bulk user creation\n5. Apply Microsoft Secure Score recommendations\n\n### Security Operations\n\n1. Start Conditional Access policies in report-only mode\n2. Review Sign-in logs for 48 h before enforcing a new policy\n3. Never hardcode credentials in scripts — use Azure Key Vault or `Get-Credential`\n4. Enable unified audit logging for all operations\n5. Conduct quarterly security reviews and Secure Score check-ins\n\n### PowerShell Automation\n\n1. Prefer Microsoft Graph (`Microsoft.Graph` module) over legacy MSOnline\n2. Include `try\u002Fcatch` blocks for error handling\n3. Implement `Write-Host`\u002F`Write-Warning` logging for audit trails\n4. Use `-WhatIf` or dry-run output before bulk destructive operations\n5. Test in a non-production tenant first\n\n---\n\n## Reference Guides\n\n**references\u002Fpowershell-templates.md**\n- Ready-to-use script templates\n- Conditional Access policy examples\n- Bulk user provisioning scripts\n- Security audit scripts\n\n**references\u002Fsecurity-policies.md**\n- Conditional Access configuration\n- MFA enforcement strategies\n- DLP and retention policies\n- Security baseline settings\n\n**references\u002Ftroubleshooting.md**\n- Common error resolutions\n- PowerShell module issues\n- Permission troubleshooting\n- DNS propagation problems\n\n---\n\n## Limitations\n\n| Constraint | Impact |\n|------------|--------|\n| Global Admin required | Full tenant setup needs highest privilege |\n| API rate limits | Bulk operations may be throttled |\n| License dependencies | E3\u002FE5 required for advanced features |\n| Hybrid scenarios | On-premises AD needs additional configuration |\n| PowerShell prerequisites | Microsoft.Graph module required |\n\n### Required PowerShell Modules\n\n```powershell\nInstall-Module Microsoft.Graph -Scope CurrentUser\nInstall-Module ExchangeOnlineManagement -Scope CurrentUser\nInstall-Module MicrosoftTeams -Scope CurrentUser\n```\n\n### Required Permissions\n\n- **Global Administrator** — Full tenant setup\n- **User Administrator** — User management\n- **Security Administrator** — Security policies\n- **Exchange Administrator** — Mailbox management\n","# Microsoft 365 Tenant Manager\n\nExpert guidance and automation for Microsoft 365 Global Administrators managing tenant setup, user lifecycle, security policies, and organizational optimization.\n\n---\n\n## Quick Start\n\n### Run a Security Audit\n\n```powershell\nConnect-MgGraph -Scopes \"Directory.Read.All\",\"Policy.Read.All\",\"AuditLog.Read.All\"\nGet-MgSubscribedSku | Select-Object SkuPartNumber, ConsumedUnits, @{N=\"Total\";E={$_.PrepaidUnits.Enabled}}\nGet-MgPolicyAuthorizationPolicy | Select-Object AllowInvitesFrom, DefaultUserRolePermissions\n```\n\n### Bulk Provision Users from CSV\n\n```powershell\n# CSV columns: DisplayName, UserPrincipalName, Department, LicenseSku\nImport-Csv .\\new_users.csv | ForEach-Object {\n    $passwordProfile = @{ Password = (New-Guid).ToString().Substring(0,16) + \"!\"; ForceChangePasswordNextSignIn = $true }\n    New-MgUser -DisplayName $_.DisplayName -UserPrincipalName $_.UserPrincipalName `\n               -Department $_.Department -AccountEnabled -PasswordProfile $passwordProfile\n}\n```\n\n### Create a Conditional Access Policy (MFA for Admins)\n\n```powershell\n$adminRoles = (Get-MgDirectoryRole | Where-Object { $_.DisplayName -match \"Admin\" }).Id\n$policy = @{\n    DisplayName = \"Require MFA for Admins\"\n    State = \"enabledForReportingButNotEnforced\"   # Start in report-only mode\n    Conditions = @{ Users = @{ IncludeRoles = $adminRoles } }\n    GrantControls = @{ Operator = \"OR\"; BuiltInControls = @(\"mfa\") }\n}\nNew-MgIdentityConditionalAccessPolicy -BodyParameter $policy\n```\n\n### Bundled Python Generators\n\nThree stdlib tools generate the PowerShell artifacts deterministically — prefer them over hand-writing scripts for bulk\u002Frepeatable work. Sample input: `sample_input.json`; expected shape: `expected_output.json`.\n\n```bash\n# Tenant setup: checklist + DNS records + license plan (JSON), or the full setup script\npython3 scripts\u002Ftenant_setup.py --config sample_input.json --format json -o tenant_plan.json\npython3 scripts\u002Ftenant_setup.py --config sample_input.json --format powershell -o tenant_setup.ps1\n\n# User lifecycle: validate first, then generate creation\u002Foffboarding scripts\npython3 scripts\u002Fuser_management.py --domain acme.com --action validate --users users.json\npython3 scripts\u002Fuser_management.py --domain acme.com --action create --users users.json -o create_users.ps1\npython3 scripts\u002Fuser_management.py --domain acme.com --action offboard --user-email jane@acme.com -o offboard.ps1\n\n# Admin scripts: CA policy \u002F security audit \u002F bulk licensing\npython3 scripts\u002Fpowershell_generator.py --tenant-domain acme.com --task conditional-access --policy-config policy.json -o ca_policy.ps1\npython3 scripts\u002Fpowershell_generator.py --tenant-domain acme.com --task security-audit -o audit.ps1\npython3 scripts\u002Fpowershell_generator.py --tenant-domain acme.com --task bulk-license --users-csv users.csv --license-sku ENTERPRISEPACK -o licenses.ps1\n```\n\n**Gate:** for user creation, run `--action validate` first and require every entry to report `\"is_valid\": true` before generating the creation script. Review every generated `.ps1` against the workflows below before running it in the tenant.\n\n---\n\n## Workflows\n\n### Workflow 1: New Tenant Setup\n\n**Step 1: Generate Setup Checklist**\n\nRun `python3 scripts\u002Ftenant_setup.py --config tenant.json --format json` and work through `setup_checklist` phase by phase; `dns_records` feeds Step 2 and `license_recommendations` feeds the licensing workflow.\n\nConfirm prerequisites before provisioning:\n- Global Admin account created and secured with MFA\n- Custom domain purchased and accessible for DNS edits\n- License SKUs confirmed (E3 vs E5 feature requirements noted)\n\n**Step 2: Configure and Verify DNS Records**\n\n```powershell\n# After adding the domain in the M365 admin center, verify propagation before proceeding\n$domain = \"company.com\"\nResolve-DnsName -Name \"_msdcs.$domain\" -Type NS -ErrorAction SilentlyContinue\n# Also run from a shell prompt:\n# nslookup -type=MX company.com\n# nslookup -type=TXT company.com   # confirm SPF record\n```\n\nWait for DNS propagation (up to 48 h) before bulk user creation.\n\n**Step 3: Apply Security Baseline**\n\n```powershell\n# Disable legacy authentication (blocks Basic Auth protocols)\n$policy = @{\n    DisplayName = \"Block Legacy Authentication\"\n    State = \"enabled\"\n    Conditions = @{ ClientAppTypes = @(\"exchangeActiveSync\",\"other\") }\n    GrantControls = @{ Operator = \"OR\"; BuiltInControls = @(\"block\") }\n}\nNew-MgIdentityConditionalAccessPolicy -BodyParameter $policy\n\n# Enable unified audit log\nSet-AdminAuditLogConfig -UnifiedAuditLogIngestionEnabled $true\n```\n\n**Step 4: Provision Users**\n\n```powershell\n$licenseSku = (Get-MgSubscribedSku | Where-Object { $_.SkuPartNumber -eq \"ENTERPRISEPACK\" }).SkuId\n\nImport-Csv .\\employees.csv | ForEach-Object {\n    try {\n        $user = New-MgUser -DisplayName $_.DisplayName -UserPrincipalName $_.UserPrincipalName `\n                           -AccountEnabled -PasswordProfile @{ Password = (New-Guid).ToString().Substring(0,12)+\"!\"; ForceChangePasswordNextSignIn = $true }\n        Set-MgUserLicense -UserId $user.Id -AddLicenses @(@{ SkuId = $licenseSku }) -RemoveLicenses @()\n        Write-Host \"Provisioned: $($_.UserPrincipalName)\"\n    } catch {\n        Write-Warning \"Failed $($_.UserPrincipalName): $_\"\n    }\n}\n```\n\n**Validation:** Spot-check 3–5 accounts in the M365 admin portal; confirm licenses show \"Active.\"\n\n---\n\n### Workflow 2: Security Hardening\n\n**Step 1: Run Security Audit**\n\n```powershell\nConnect-MgGraph -Scopes \"Directory.Read.All\",\"Policy.Read.All\",\"AuditLog.Read.All\",\"Reports.Read.All\"\n\n# Export Conditional Access policy inventory\nGet-MgIdentityConditionalAccessPolicy | Select-Object DisplayName, State |\n    Export-Csv .\\ca_policies.csv -NoTypeInformation\n\n# Find accounts without MFA registered\n$report = Get-MgReportAuthenticationMethodUserRegistrationDetail\n$report | Where-Object { -not $_.IsMfaRegistered } |\n    Select-Object UserPrincipalName, IsMfaRegistered |\n    Export-Csv .\\no_mfa_users.csv -NoTypeInformation\n\nWrite-Host \"Audit complete. Review ca_policies.csv and no_mfa_users.csv.\"\n```\n\n**Step 2: Create MFA Policy (report-only first)**\n\n```powershell\n$policy = @{\n    DisplayName = \"Require MFA All Users\"\n    State = \"enabledForReportingButNotEnforced\"\n    Conditions = @{ Users = @{ IncludeUsers = @(\"All\") } }\n    GrantControls = @{ Operator = \"OR\"; BuiltInControls = @(\"mfa\") }\n}\nNew-MgIdentityConditionalAccessPolicy -BodyParameter $policy\n```\n\n**Validation:** After 48 h, review Sign-in logs in Entra ID; confirm expected users would be challenged, then change `State` to `\"enabled\"`.\n\n**Step 3: Review Secure Score**\n\n```powershell\n# Retrieve current Secure Score and top improvement actions\nGet-MgSecuritySecureScore -Top 1 | Select-Object CurrentScore, MaxScore, ActiveUserCount\nGet-MgSecuritySecureScoreControlProfile | Sort-Object -Property ActionType |\n    Select-Object Title, ImplementationStatus, MaxScore | Format-Table -AutoSize\n```\n\n---\n\n### Workflow 3: User Offboarding\n\n**Step 1: Block Sign-in and Revoke Sessions**\n\n```powershell\n$upn = \"departing.user@company.com\"\n$user = Get-MgUser -Filter \"userPrincipalName eq '$upn'\"\n\n# Block sign-in immediately\nUpdate-MgUser -UserId $user.Id -AccountEnabled:$false\n\n# Revoke all active tokens\nInvoke-MgInvalidateAllUserRefreshToken -UserId $user.Id\nWrite-Host \"Sign-in blocked and sessions revoked for $upn\"\n```\n\n**Step 2: Preview with -WhatIf (license removal)**\n\n```powershell\n# Identify assigned licenses\n$licenses = (Get-MgUserLicenseDetail -UserId $user.Id).SkuId\n\n# Dry-run: print what would be removed\n$licenses | ForEach-Object { Write-Host \"[WhatIf] Would remove SKU: $_\" }\n```\n\n**Step 3: Execute Offboarding**\n\n```powershell\n# Remove licenses\nSet-MgUserLicense -UserId $user.Id -AddLicenses @() -RemoveLicenses $licenses\n\n# Convert mailbox to shared (requires ExchangeOnlineManagement module)\nSet-Mailbox -Identity $upn -Type Shared\n\n# Remove from all groups\nGet-MgUserMemberOf -UserId $user.Id | ForEach-Object {\n    try { Remove-MgGroupMemberByRef -GroupId $_.Id -DirectoryObjectId $user.Id } catch {}\n}\nWrite-Host \"Offboarding complete for $upn\"\n```\n\n**Validation:** Confirm in the M365 admin portal that the account shows \"Blocked,\" has no active licenses, and the mailbox type is \"Shared.\"\n\n---\n\n## Best Practices\n\n### Tenant Setup\n\n1. Enable MFA before adding users\n2. Configure named locations for Conditional Access\n3. Use separate admin accounts with PIM\n4. Verify custom domains (and DNS propagation) before bulk user creation\n5. Apply Microsoft Secure Score recommendations\n\n### Security Operations\n\n1. Start Conditional Access policies in report-only mode\n2. Review Sign-in logs for 48 h before enforcing a new policy\n3. Never hardcode credentials in scripts — use Azure Key Vault or `Get-Credential`\n4. Enable unified audit logging for all operations\n5. Conduct quarterly security reviews and Secure Score check-ins\n\n### PowerShell Automation\n\n1. Prefer Microsoft Graph (`Microsoft.Graph` module) over legacy MSOnline\n2. Include `try\u002Fcatch` blocks for error handling\n3. Implement `Write-Host`\u002F`Write-Warning` logging for audit trails\n4. Use `-WhatIf` or dry-run output before bulk destructive operations\n5. Test in a non-production tenant first\n\n---\n\n## Reference Guides\n\n**references\u002Fpowershell-templates.md**\n- Ready-to-use script templates\n- Conditional Access policy examples\n- Bulk user provisioning scripts\n- Security audit scripts\n\n**references\u002Fsecurity-policies.md**\n- Conditional Access configuration\n- MFA enforcement strategies\n- DLP and retention policies\n- Security baseline settings\n\n**references\u002Ftroubleshooting.md**\n- Common error resolutions\n- PowerShell module issues\n- Permission troubleshooting\n- DNS propagation problems\n\n---\n\n## Limitations\n\n| Constraint | Impact |\n|------------|--------|\n| Global Admin required | Full tenant setup needs highest privilege |\n| API rate limits | Bulk operations may be throttled |\n| License dependencies | E3\u002FE5 required for advanced features |\n| Hybrid scenarios | On-premises AD needs additional configuration |\n| PowerShell prerequisites | Microsoft.Graph module required |\n\n### Required PowerShell Modules\n\n```powershell\nInstall-Module Microsoft.Graph -Scope CurrentUser\nInstall-Module ExchangeOnlineManagement -Scope CurrentUser\nInstall-Module MicrosoftTeams -Scope CurrentUser\n```\n\n### Required Permissions\n\n- **Global Administrator** — Full tenant setup\n- **User Administrator** — User management\n- **Security Administrator** — Security policies\n- **Exchange Administrator** — Mailbox management\n",{"name":5,"description":7},"main","b4ebd6d8c3b36347a5d435bcb343a5fc1c6f08d1","skills-library\u002Fengineering-team\u002Fskills\u002Fms365-tenant-manager","https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE","https:\u002F\u002Fgithub.com\u002FTehutiRaEl","2026-11-15 04:00:21",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add TehutiRaEl\u002FTHEHIVE --skill ms365-tenant-manager",{"tool":35,"command":36},"bunx","bunx skills add TehutiRaEl\u002FTHEHIVE --skill ms365-tenant-manager",{"tool":38,"command":39},"pnpm","pnpm dlx skills add TehutiRaEl\u002FTHEHIVE --skill ms365-tenant-manager","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills-library\u002Fengineering-team\u002Fskills\u002Fms365-tenant-manager\u002FSKILL.md",true,[43,49,53,57,61,65,71,75],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"expected_output.json","REFERENCE","参考文档",2052,"https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills-library\u002Fengineering-team\u002Fskills\u002Fms365-tenant-manager\u002Fexpected_output.json",{"path":50,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":51,"sourceHtmlUrl":52},"references\u002Fpowershell-templates.md",21511,"https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills-library\u002Fengineering-team\u002Fskills\u002Fms365-tenant-manager\u002Freferences\u002Fpowershell-templates.md",{"path":54,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":55,"sourceHtmlUrl":56},"references\u002Fsecurity-policies.md",8792,"https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills-library\u002Fengineering-team\u002Fskills\u002Fms365-tenant-manager\u002Freferences\u002Fsecurity-policies.md",{"path":58,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":59,"sourceHtmlUrl":60},"references\u002Ftroubleshooting.md",9809,"https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills-library\u002Fengineering-team\u002Fskills\u002Fms365-tenant-manager\u002Freferences\u002Ftroubleshooting.md",{"path":62,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":63,"sourceHtmlUrl":64},"sample_input.json",471,"https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills-library\u002Fengineering-team\u002Fskills\u002Fms365-tenant-manager\u002Fsample_input.json",{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"scripts\u002Fpowershell_generator.py","SCRIPT","脚本",16042,"https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills-library\u002Fengineering-team\u002Fskills\u002Fms365-tenant-manager\u002Fscripts\u002Fpowershell_generator.py",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"scripts\u002Ftenant_setup.py",18444,"https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills-library\u002Fengineering-team\u002Fskills\u002Fms365-tenant-manager\u002Fscripts\u002Ftenant_setup.py",{"path":76,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":77,"sourceHtmlUrl":78},"scripts\u002Fuser_management.py",18709,"https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills-library\u002Fengineering-team\u002Fskills\u002Fms365-tenant-manager\u002Fscripts\u002Fuser_management.py",[80,87,93,100,107,114],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M76XP63XDM4PFPX8MMVYN9JX","preamble-gate","Use BEFORE doing any work in this repo — before the first file edit, commit, push, PR, branch operation, workflow dispatch, scheduled trigger or timer, agent\u002Fsubagent spawn, dependency install, or message sent to an outside service. Forces a plain-language preamble to the founder first: WHAT you are about to do, WHY, HOW, why it is NECESSARY, the PROJECTED IMPROVEMENT, and the COST and RISK — then, for consequential work (governance, security, money, CI\u002Ftriggers, rewriting history, multi-agent fan-out), waits for an explicit go-ahead. Read-only investigation (reading files, grep, git log\u002Fdiff, answering questions) is exempt. Applies to every AI that works in this repo, not just Claude. Founder rule, 2026-11-10, written after an unattended automation ran up cost and froze the hive. Not a substitute for wired-or-not (which governs how completion is CLAIMED); this governs what happens BEFORE work starts.","https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpreamble-gate\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":18},"01M75RAYXC1W361YR9NBXD59AM","visionary-recommender","https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills\u002Fvisionary-recommender\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":18},"01M75RAQN9Q450RD57J2S6FSR4","syllabus","Generates a curated supplementary reading list from any course syllabus using Consensus academic search. Grill-me intake (syllabus input format + course audience + year range) plus a grouping forcing-options checkpoint before any search runs — so the reading list matches the course's level and recency need. Parses the syllabus to extract topics and learning outcomes, searches Consensus for recent peer-reviewed papers per topic, and produces a professionally formatted .docx with clickable Consensus links, plain-language summaries calibrated to audience level, and Bloom-higher-order discussion questions tied to course learning goals. Use when the user uploads a syllabus, course outline, or curriculum document and wants supplementary readings (e.g., 'create a reading list from this syllabus', 'find recent papers for my course') — even casual mentions with a syllabus attached should trigger this skill.","https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills-library\u002Fresearch\u002Fsyllabus\u002Fskills\u002Fsyllabus\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":18},"01M75RAG1XMCJMF30HFV5S79AK","research","Default entry point for any research request — a hybrid router that classifies the question deterministically and either delegates to a specialist research skill (pulse for trends\u002Fsentiment, grants for NIH funding, litreview for academic literature, syllabus for course reading, patent for prior-art + IP landscape, dossier for entity research) or runs its own plan-decompose-multi-source-search-synthesize-cite fallback workflow when no specialist matches. Always surfaces the routing decision so users can override. Use when the user makes any research request that doesn't obviously match a more-specific specialist skill (e.g., \"research [topic]\", \"look into [topic]\", \"what do we know about [topic]\", \"investigate [topic]\", \"find me information on [topic]\", \"do some research on [topic]\", \"I need to understand [topic]\"). Output is a markdown briefing (default) or .docx document (on request) with full citations and an audit log.","https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills-library\u002Fresearch\u002Fresearch\u002Fskills\u002Fresearch\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":18},"01M75RA8RK2JVWB8MYGRB65V75","pulse","Multi-source recency research skill that takes the pulse of any topic across Reddit, Hacker News, the open web, and optionally X\u002FTwitter within a configurable recent window (default 30 days). Forcing intake clarifies topic specificity, angle (trend\u002Fsentiment\u002Fproblems\u002Fopportunities\u002Fcomparison), time window, and platform scope before searching. Returns a synthesized briefing with citations, engagement metrics, and cross-platform pattern analysis. Use when the user requests multi-source recency intelligence on a topic (e.g., 'pulse on [topic]', 'what's happening with [topic]', 'what are people saying about [topic]', 'current conversation about [topic]', 'take the pulse of [topic]', 'trending: [topic]', 'find me info on [topic]'), and for competitor research, trend discovery, tool comparisons, and audience sentiment analysis.","https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills-library\u002Fresearch\u002Fpulse\u002Fskills\u002Fpulse\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":18},"01M75RA08RXYRFSTNC6EEEX4ZD","patent","Patent prior-art and landscape intelligence skill — not generic patent help. Commits to one of five sub-use-cases via forcing intake (novelty search \u002F freedom-to-operate \u002F competitive landscape \u002F acquisition diligence \u002F litigation prior-art) before any search runs. Searches Google Patents, Espacenet, USPTO, and optionally Lens.org for citation-graph signals. Output is an editable Word document (.docx) with verdict, ranked closest art (claim-text extracted), CPC-class-aware landscape, family-resolved hits, geographic coverage, FTO flags where applicable, strategy recommendations, and full audit log. Use when the user asks for patent searching or analysis (e.g., 'prior art search for [invention]', 'freedom to operate analysis for [product]'). Produces search signal, not legal advice — always recommends consulting a patent attorney before filing or licensing decisions. Trademark, copyright, and trade-secret questions are out of scope.","https:\u002F\u002Fgithub.com\u002FTehutiRaEl\u002FTHEHIVE\u002Fblob\u002Fmain\u002Fskills-library\u002Fresearch\u002Fpatent\u002Fskills\u002Fpatent\u002FSKILL.md",[],[]]