Tests/Public/Testing-MockedObjects.ps1
# Module: TeamsFunctions # Function: Test # Author: David Eberhardt # Updated: 23-JUL-2022 # Purpose: Mock Objects of the type AzureAdUser, AzureAdGroup, CsOnlineUser, CsOnlineApplicationInstance, etc. #Licenses & ServicePlans # AzureAdUserLicenseServicePlans # License: Microsoft 365 E5 Developer (Without Windows And Audio Conferencing) $ServicePlansLic1 = @( [PSCustomObject]@{ ProductName = 'Azure Active Directory Premium P1' ServicePlanName = 'AAD_PREMIUM' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Azure Active Directory Premium P2' ServicePlanName = 'AAD_PREMIUM_P2' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Azure Information Protection Premium P1' ServicePlanName = 'RMS_S_PREMIUM' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Azure Information Protection Premium P2' ServicePlanName = 'RMS_S_PREMIUM2' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Common Data Service' ServicePlanName = 'DYN365_CDS_O365_P3' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Common Data Service - Viral' ServicePlanName = 'DYN365_CDS_VIRAL' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Common Data Service For Teams' ServicePlanName = 'CDS_O365_P3' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Customer Lockbox' ServicePlanName = 'LOCKBOX_ENTERPRISE' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Data Classification In Microsoft 365' ServicePlanName = 'MIP_S_Exchange' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Exchange Foundation' ServicePlanName = 'EXCHANGE_S_FOUNDATION' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Exchange Online (Plan 2)' ServicePlanName = 'EXCHANGE_S_ENTERPRISE' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Flow Free' ServicePlanName = 'FLOW_P2_VIRAL' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Graph Connectors Search With Index' ServicePlanName = 'GRAPH_CONNECTORS_SEARCH_INDEX' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Information Protection And Governance Analytics - Premium' ServicePlanName = 'Content_Explorer' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Information Protection For Office 365 - Premium' ServicePlanName = 'MIP_S_CLP2' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Information Protection For Office 365 Â Standard' ServicePlanName = 'MIP_S_CLP1' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft 365 Advanced Auditing' ServicePlanName = 'M365_ADVANCED_AUDITING' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft 365 Apps For Enterprise' ServicePlanName = 'OFFICESUBSCRIPTION' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft 365 Communication Compliance' ServicePlanName = 'MICROSOFT_COMMUNICATION_COMPLIANCE' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft 365 Defender' ServicePlanName = 'MTP' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft 365 Phone System' ServicePlanName = 'MCOEV' ProvisioningStatus = 'Success' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Microsoft Azure Active Directory Rights' ServicePlanName = 'RMS_S_ENTERPRISE' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Azure Multi-Factor Authentication' ServicePlanName = 'MFA_PREMIUM' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Bookings' ServicePlanName = 'MICROSOFTBOOKINGS' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Cloud App Security' ServicePlanName = 'ADALLOM_S_STANDALONE' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Communications Compliance' ServicePlanName = 'COMMUNICATIONS_COMPLIANCE' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Communications Dlp' ServicePlanName = 'COMMUNICATIONS_DLP' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Customer Key' ServicePlanName = 'CUSTOMER_KEY' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Data Investigations' ServicePlanName = 'DATA_INVESTIGATIONS' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Defender For Identity' ServicePlanName = 'ATA' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Defender For Office 365 (Plan 1)' ServicePlanName = 'ATP_ENTERPRISE' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Defender For Office 365 (Plan 2)' ServicePlanName = 'THREAT_INTELLIGENCE' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Excel Advanced Analytics' ServicePlanName = 'EXCEL_PREMIUM' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Forms (Plan E5)' ServicePlanName = 'FORMS_PLAN_E5' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Information Governance' ServicePlanName = 'INFO_GOVERNANCE' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Insider Risk Management' ServicePlanName = 'INSIDER_RISK' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Insider Risk Management' ServicePlanName = 'INSIDER_RISK_MANAGEMENT' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Intune' ServicePlanName = 'INTUNE_A' ProvisioningStatus = 'PendingInput' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Ml-Based Classification' ServicePlanName = 'ML_CLASSIFICATION' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Myanalytics (Full)' ServicePlanName = 'EXCHANGE_ANALYTICS' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Planner' ServicePlanName = 'PROJECTWORKMANAGEMENT' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Records Management' ServicePlanName = 'RECORDS_MANAGEMENT' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Search' ServicePlanName = 'MICROSOFT_SEARCH' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Staffhub' ServicePlanName = 'Deskless' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Stream For Office 365 E5' ServicePlanName = 'STREAM_O365_E5' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Microsoft Teams' ServicePlanName = 'TEAMS1' ProvisioningStatus = 'Success' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Mobile Device Management For Office 365' ServicePlanName = 'INTUNE_O365' ProvisioningStatus = 'PendingActivation' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Nucleus' ServicePlanName = 'Nucleus' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Office 365 Advanced Ediscovery' ServicePlanName = 'EQUIVIO_ANALYTICS' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Office 365 Advanced Security Management' ServicePlanName = 'ADALLOM_S_O365' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Office 365 Privileged Access Management' ServicePlanName = 'PAM_ENTERPRISE' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Office 365 Safedocs' ServicePlanName = 'SAFEDOCS' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Office For The Web' ServicePlanName = 'SHAREPOINTWAC' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Power Apps For Office 365 (Plan 3)' ServicePlanName = 'POWERAPPS_O365_P3' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Power Automate For Office 365' ServicePlanName = 'FLOW_O365_P3' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Power Bi Pro' ServicePlanName = 'BI_AZURE_P2' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Power Virtual Agents For Office 365' ServicePlanName = 'POWER_VIRTUAL_AGENTS_O365_P3' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Project For Office (Plan E5)' ServicePlanName = 'PROJECT_O365_P3' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Sharepoint (Plan 2)' ServicePlanName = 'SHAREPOINTENTERPRISE' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Skype For Business Online (Plan 2)' ServicePlanName = 'MCOSTANDARD' ProvisioningStatus = 'Success' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Sway' ServicePlanName = 'SWAY' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'To-Do (Plan 3)' ServicePlanName = 'BPOS_S_TODO_3' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Viva Learning Seeded' ServicePlanName = 'VIVA_LEARNING_SEEDED' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Whiteboard (Plan 3)' ServicePlanName = 'WHITEBOARD_PLAN3' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'YammerEnterprise' ServicePlanName = 'YAMMER_ENTERPRISE' ProvisioningStatus = 'Success' RelevantForTeams = $False } ) # License: Microsoft Flow Free $ServicePlansLic2 = @( [PSCustomObject]@{ ProductName = 'Common Data Service - Viral' ServicePlanName = 'DYN365_CDS_VIRAL' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Exchange Foundation' ServicePlanName = 'EXCHANGE_S_FOUNDATION' ProvisioningStatus = 'Success' RelevantForTeams = $False }, [PSCustomObject]@{ ProductName = 'Flow Free' ServicePlanName = 'FLOW_P2_VIRAL' ProvisioningStatus = 'Success' RelevantForTeams = $False } ) # Teams and PhoneSystem assigned and ACTIVE $ServicePlansGoodRA = @( #TODO requires validation against Live Serivce - is this the only servicePlan? [PSCustomObject]@{ ProductName = 'Microsoft 365 Phone System Virtual User' ServicePlanName = 'MCOEV_VIRTUALUSER' ProvisioningStatus = 'Success' RelevantForTeams = $True } ) # Teams and PhoneSystem assigned and ACTIVE $ServicePlansGood1 = @( [PSCustomObject]@{ ProductName = 'Microsoft 365 Phone System' ServicePlanName = 'MCOEV' ProvisioningStatus = 'Success' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Microsoft Teams' ServicePlanName = 'TEAMS1' ProvisioningStatus = 'Success' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Skype For Business Online (Plan 2)' ServicePlanName = 'MCOSTANDARD' ProvisioningStatus = 'Success' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Microsoft Intune' ServicePlanName = 'INTUNE_A' ProvisioningStatus = 'PendingInput' RelevantForTeams = $False } ) # Teams and PhoneSystem assigned and DISABLED $ServicePlansBad1 = @( [PSCustomObject]@{ ProductName = 'Microsoft 365 Phone System' ServicePlanName = 'MCOEV' ProvisioningStatus = 'Disabled' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Microsoft Teams' ServicePlanName = 'TEAMS1' ProvisioningStatus = 'Disabled' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Skype For Business Online (Plan 2)' ServicePlanName = 'MCOSTANDARD' ProvisioningStatus = 'Success' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Microsoft Intune' ServicePlanName = 'INTUNE_A' ProvisioningStatus = 'PendingInput' RelevantForTeams = $False } ) # Teams assigned and ACTIVE, PhoneSystem not assigned $ServicePlansBad2 = @( [PSCustomObject]@{ ProductName = 'Microsoft Teams' ServicePlanName = 'TEAMS1' ProvisioningStatus = 'Success' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Skype For Business Online (Plan 2)' ServicePlanName = 'MCOSTANDARD' ProvisioningStatus = 'Success' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Microsoft Intune' ServicePlanName = 'INTUNE_A' ProvisioningStatus = 'PendingInput' RelevantForTeams = $False } ) # Teams assigned and DISABLED, PhoneSystem assigned and ACTIVE $ServicePlansBad3 = @( [PSCustomObject]@{ ProductName = 'Microsoft 365 Phone System' ServicePlanName = 'MCOEV' ProvisioningStatus = 'Disabled' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Microsoft Teams' ServicePlanName = 'TEAMS1' ProvisioningStatus = 'Success' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Skype For Business Online (Plan 2)' ServicePlanName = 'MCOSTANDARD' ProvisioningStatus = 'Success' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Microsoft Intune' ServicePlanName = 'INTUNE_A' ProvisioningStatus = 'PendingInput' RelevantForTeams = $False } ) # Teams not assigned, PhoneSystem not assigned $ServicePlansBad4 = @( [PSCustomObject]@{ ProductName = 'Skype For Business Online (Plan 2)' ServicePlanName = 'MCOSTANDARD' ProvisioningStatus = 'Success' RelevantForTeams = $True }, [PSCustomObject]@{ ProductName = 'Microsoft Intune' ServicePlanName = 'INTUNE_A' ProvisioningStatus = 'PendingInput' RelevantForTeams = $False } ) #endregion # AzureAdUserLicense # Fully Licensed $AzureAdUserLicenseGood1 = [PSCustomObject]@{ UserPrincipalName = 'SamVimes@discworld.onmicrosoft.com' DisplayName = 'Sir Samuel Vimes' ObjectId = '239943fa-1da2-4d80-8cec-cdd3c7239d2c' UsageLocation = 'GB' Licenses = @( [PSCustomObject]@{ ProductName = 'Microsoft 365 E5 Developer (Without Windows And Audio Conferencing)' SkuPartNumber = 'DEVELOPERPACK_E5' LicenseType = 'Package' ParameterName = 'Microsoft365E5Developer' IncludesTeams = $True IncludesPhoneSystem = $True SkuId = 'c42b9cae-ea4f-4ab7-9717-81576235ccac' ServicePlans = $ServicePlansGood1 }, [PSCustomObject]@{ ProductName = 'Microsoft Flow Free' SkuPartNumber = 'FLOW_FREE' LicenseType = 'Package' ParameterName = 'MicrosoftFlowFree' IncludesTeams = $False IncludesPhoneSystem = $False SkuId = 'f30db892-07e9-47e9-837c-80727f46fd3d' ServicePlans = $ServicePlansGood1 } ) ServicePlans = $ServicePlansGood1 AudioConferencing = $False CommonAreaPhoneLicense = $False PhoneSystemVirtualUser = $False PhoneSystem = $True PhoneSystemStatus = 'Success' CallingPlanDomestic120 = $False CallingPlanDomestic = $False CallingPlanInternational = $False OtherCallingPlan = $False CommunicationsCredits = $False CallingPlan = $null } # Licensed but disabled $AzureAdUserLicenseToRemedy1 = [PSCustomObject]@{ UserPrincipalName = 'SamVimes@discworld.onmicrosoft.com' DisplayName = 'Sir Samuel Vimes' ObjectId = '239943fa-1da2-4d80-8cec-cdd3c7239d2c' UsageLocation = 'GB' Licenses = @( [PSCustomObject]@{ ProductName = 'Microsoft 365 E5 Developer (Without Windows And Audio Conferencing)' SkuPartNumber = 'DEVELOPERPACK_E5' LicenseType = 'Package' ParameterName = 'Microsoft365E5Developer' IncludesTeams = $True IncludesPhoneSystem = $True SkuId = 'c42b9cae-ea4f-4ab7-9717-81576235ccac' ServicePlans = $ServicePlansBad1 }, [PSCustomObject]@{ ProductName = 'Microsoft Flow Free' SkuPartNumber = 'FLOW_FREE' LicenseType = 'Package' ParameterName = 'MicrosoftFlowFree' IncludesTeams = $False IncludesPhoneSystem = $False SkuId = 'f30db892-07e9-47e9-837c-80727f46fd3d' ServicePlans = $ServicePlansBad1 } ) ServicePlans = $ServicePlansBad1 AudioConferencing = $False CommonAreaPhoneLicense = $False PhoneSystemVirtualUser = $False PhoneSystem = $True PhoneSystemStatus = 'Success' CallingPlanDomestic120 = $False CallingPlanDomestic = $False CallingPlanInternational = $False OtherCallingPlan = $False CommunicationsCredits = $False CallingPlan = $null } # Unlicensed $AzureAdUserLicenseBad1 = [PSCustomObject]@{ UserPrincipalName = 'ReacherGilt@discworld.onmicrosoft.com' DisplayName = 'Reacher Gilt' ObjectId = 'b233faf7-208d-47e2-8af2-5e5069f9aa91' UsageLocation = 'GB' Licenses = @() ServicePlans = @() AudioConferencing = $False CommonAreaPhoneLicense = $False PhoneSystemVirtualUser = $False PhoneSystem = $False PhoneSystemStatus = $null CallingPlanDomestic120 = $False CallingPlanDomestic = $False CallingPlanInternational = $False OtherCallingPlan = $False CommunicationsCredits = $False CallingPlan = $null } $AzureAdUserLicenseRAGood1 = [PSCustomObject]@{ #TODO Add License for RA () } $AzureAdUserLicenseRAToRemedy1 = [PSCustomObject]@{ #TODO Add License for RA () } $AzureAdUserLicenseRABad1 = [PSCustomObject]@{ #TODO Add License for RA () } # User Object $CsOnlineUserGood1 = [PSCustomObject]@{ AccountEnabled = $True Alias = 'SamVimes' ApplicationAccessPolicy = $null AssignedPlan = @('BPOS_S_Enterprise', 'Teams', 'MCOEV', 'MCOProfessional') CallingLineIdentity = $null City = $null Company = $null Country = $null Department = $null DialPlan = 'GB' DisplayName = 'Sir Samuel Vimes' EnterpriseVoiceEnabled = $True ExternalAccessPolicy = $null FeatureTypes = @('Teams', 'PhoneSystem') GivenName = 'Samuel' HideFromAddressLists = $null HostingProvider = 'sipfed.online.lync.com' Identity = '239943fa-1da2-4d80-8cec-cdd3c7239d2c' InterpretedUserType = 'PureOnlineTeamsOnlyUser' IsSipEnabled = $True LastName = 'Vimes' LineUri = $null LocationPolicy = $null OnPremEnterpriseVoiceEnabled = $null OnPremHostingProvider = 'Not Yet Supported.' OnPremLineUri = 'Not Yet Supported.' OnPremOptionFlags = $null OnPremSIPEnabled = $null OnPremSipAddress = @('SharePoint', 'SharePoint', 'exchange' ) ProxyAddresses = @('SMTP=SamVimes@discworld.onmicrosoft.com' ) ShadowProxyAddresses = @() SipAddress = 'sip=SamVimes@discworld.onmicrosoft.com' SoftDeletionTimestamp = $null StateOrProvince = $null Street = $null TeamsAppPermissionPolicy = $null TeamsAppSetupPolicy = $null TeamsAudioConferencingPolicy = $null TeamsCallHoldPolicy = $null TeamsCallParkPolicy = $null TeamsCallingPolicy = $null TeamsCarrierEmergencyCallRoutingPolicy = $null TeamsChannelsPolicy = $null TeamsComplianceRecordingPolicy = $null TeamsCortanaPolicy = $null TeamsEducationAssignmentsAppPolicy = $null TeamsEmergencyCallRoutingPolicy = $null TeamsEmergencyCallingPolicy = $null TeamsEnhancedEncryptionPolicy = $null TeamsFeedbackPolicy = $null TeamsFilesPolicy = $null TeamsIPPhonePolicy = $null TeamsMeetingBrandingPolicy = $null TeamsMeetingBroadcastPolicy = $null TeamsMeetingPolicy = 'MP-MSS Restricted' TeamsMessagingPolicy = $null TeamsMobilityPolicy = $null TeamsNetworkRoamingPolicy = $null TeamsNotificationAndFeedsPolicy = $null TeamsOwnersPolicy = $null TeamsShiftsAppPolicy = $null TeamsShiftsPolicy = $null TeamsSurvivableBranchAppliancePolicy = $null TeamsSyntheticAutomatedCallPolicy = $null TeamsTargetingPolicy = $null TeamsTasksPolicy = $null TeamsTemplatePermissionPolicy = $null TeamsUpdateManagementPolicy = $null TeamsUpgradeEffectiveMode = 'TeamsOnly' TeamsUpgradeNotificationsEnabled = $False TeamsUpgradeOverridePolicy = $null TeamsUpgradePolicy = 'UpgradeToTeams' TeamsUpgradePolicyIsReadOnly = 'ModeAndNotifications' TeamsVdiPolicy = $null TeamsVerticalPackagePolicy = $null TeamsVideoInteropServicePolicy = $null TeamsVoiceApplicationsPolicy = $null TenantDialPlan = $null TenantId = '7271af30-bd30-4664-a407-c44dc3ca8b12' Title = $null UsageLocation = 'GB' UserDirSyncEnabled = $null UserPrincipalName = 'SamVimes@discworld.onmicrosoft.com' WhenChanged = $null } $CsOnlineUserToRemedy1 = [PSCustomObject]@{ # Maybe Change username (Angua?) AccountEnabled = $True Alias = 'SamVimes' ApplicationAccessPolicy = $null AssignedPlan = @('BPOS_S_Enterprise', 'Teams', 'MCOEV', 'MCOProfessional') CallingLineIdentity = $null City = $null Company = $null Country = $null Department = $null DialPlan = 'GB' DisplayName = 'Sir Samuel Vimes' EnterpriseVoiceEnabled = $True ExternalAccessPolicy = $null FeatureTypes = @('Teams', 'PhoneSystem') # Check whether PhoneSystem shows up here if disabled GivenName = 'Samuel' HideFromAddressLists = $null HostingProvider = 'sipfed.online.lync.com' Identity = '239943fa-1da2-4d80-8cec-cdd3c7239d2c' InterpretedUserType = 'PureOnlineTeamsOnlyUser' IsSipEnabled = $True LastName = 'Vimes' LineUri = $null LocationPolicy = $null OnPremEnterpriseVoiceEnabled = $null OnPremHostingProvider = 'Not Yet Supported.' OnPremLineUri = 'Not Yet Supported.' OnPremOptionFlags = $null OnPremSIPEnabled = $null OnPremSipAddress = @('SharePoint', 'SharePoint', 'exchange' ) ProxyAddresses = @('SMTP=SamVimes@discworld.onmicrosoft.com' ) ShadowProxyAddresses = @() SipAddress = 'sip=SamVimes@discworld.onmicrosoft.com' SoftDeletionTimestamp = $null StateOrProvince = $null Street = $null TeamsAppPermissionPolicy = $null TeamsAppSetupPolicy = $null TeamsAudioConferencingPolicy = $null TeamsCallHoldPolicy = $null TeamsCallParkPolicy = $null TeamsCallingPolicy = $null TeamsCarrierEmergencyCallRoutingPolicy = $null TeamsChannelsPolicy = $null TeamsComplianceRecordingPolicy = $null TeamsCortanaPolicy = $null TeamsEducationAssignmentsAppPolicy = $null TeamsEmergencyCallRoutingPolicy = $null TeamsEmergencyCallingPolicy = $null TeamsEnhancedEncryptionPolicy = $null TeamsFeedbackPolicy = $null TeamsFilesPolicy = $null TeamsIPPhonePolicy = $null TeamsMeetingBrandingPolicy = $null TeamsMeetingBroadcastPolicy = $null TeamsMeetingPolicy = 'MP-MSS Restricted' TeamsMessagingPolicy = $null TeamsMobilityPolicy = $null TeamsNetworkRoamingPolicy = $null TeamsNotificationAndFeedsPolicy = $null TeamsOwnersPolicy = $null TeamsShiftsAppPolicy = $null TeamsShiftsPolicy = $null TeamsSurvivableBranchAppliancePolicy = $null TeamsSyntheticAutomatedCallPolicy = $null TeamsTargetingPolicy = $null TeamsTasksPolicy = $null TeamsTemplatePermissionPolicy = $null TeamsUpdateManagementPolicy = $null TeamsUpgradeEffectiveMode = 'TeamsOnly' TeamsUpgradeNotificationsEnabled = $False TeamsUpgradeOverridePolicy = $null TeamsUpgradePolicy = 'UpgradeToTeams' TeamsUpgradePolicyIsReadOnly = 'ModeAndNotifications' TeamsVdiPolicy = $null TeamsVerticalPackagePolicy = $null TeamsVideoInteropServicePolicy = $null TeamsVoiceApplicationsPolicy = $null TenantDialPlan = $null TenantId = '7271af30-bd30-4664-a407-c44dc3ca8b12' Title = $null UsageLocation = 'GB' UserDirSyncEnabled = $null UserPrincipalName = 'SamVimes@discworld.onmicrosoft.com' WhenChanged = $null } $CsOnlineUserBad1 = [PSCustomObject]@{ AccountEnabled = $True Alias = 'ReacherGilt' ApplicationAccessPolicy = $null AssignedPlan = @('BPOS_S_Enterprise', 'Teams', 'MCOProfessional') CallingLineIdentity = $null City = $null Company = $null Country = $null Department = $null DialPlan = 'GB' DisplayName = 'Reacher Gilt' EnterpriseVoiceEnabled = $True ExternalAccessPolicy = $null FeatureTypes = @('Teams') GivenName = 'Reacher' HideFromAddressLists = $null HostingProvider = 'sipfed.online.lync.com' Identity = 'b233faf7-208d-47e2-8af2-5e5069f9aa91' InterpretedUserType = 'PureOnlineTeamsOnlyUser' IsSipEnabled = $True LastName = 'Gilt' LineUri = $null LocationPolicy = $null OnPremEnterpriseVoiceEnabled = $null OnPremHostingProvider = 'Not Yet Supported.' OnPremLineUri = 'Not Yet Supported.' OnPremOptionFlags = $null OnPremSIPEnabled = $null OnPremSipAddress = @('SharePoint', 'SharePoint', 'exchange' ) ProxyAddresses = @('SMTP=ReacherGilt@discworld.onmicrosoft.com' ) ShadowProxyAddresses = @() SipAddress = 'sip=ReacherGilt@discworld.onmicrosoft.com' SoftDeletionTimestamp = $null StateOrProvince = $null Street = $null TeamsAppPermissionPolicy = $null TeamsAppSetupPolicy = $null TeamsAudioConferencingPolicy = $null TeamsCallHoldPolicy = $null TeamsCallParkPolicy = $null TeamsCallingPolicy = $null TeamsCarrierEmergencyCallRoutingPolicy = $null TeamsChannelsPolicy = $null TeamsComplianceRecordingPolicy = $null TeamsCortanaPolicy = $null TeamsEducationAssignmentsAppPolicy = $null TeamsEmergencyCallRoutingPolicy = $null TeamsEmergencyCallingPolicy = $null TeamsEnhancedEncryptionPolicy = $null TeamsFeedbackPolicy = $null TeamsFilesPolicy = $null TeamsIPPhonePolicy = $null TeamsMeetingBrandingPolicy = $null TeamsMeetingBroadcastPolicy = $null TeamsMeetingPolicy = 'MP-MSS Restricted' TeamsMessagingPolicy = $null TeamsMobilityPolicy = $null TeamsNetworkRoamingPolicy = $null TeamsNotificationAndFeedsPolicy = $null TeamsOwnersPolicy = $null TeamsShiftsAppPolicy = $null TeamsShiftsPolicy = $null TeamsSurvivableBranchAppliancePolicy = $null TeamsSyntheticAutomatedCallPolicy = $null TeamsTargetingPolicy = $null TeamsTasksPolicy = $null TeamsTemplatePermissionPolicy = $null TeamsUpdateManagementPolicy = $null TeamsUpgradeEffectiveMode = 'TeamsOnly' TeamsUpgradeNotificationsEnabled = $False TeamsUpgradeOverridePolicy = $null TeamsUpgradePolicy = 'UpgradeToTeams' TeamsUpgradePolicyIsReadOnly = 'ModeAndNotifications' TeamsVdiPolicy = $null TeamsVerticalPackagePolicy = $null TeamsVideoInteropServicePolicy = $null TeamsVoiceApplicationsPolicy = $null TenantDialPlan = $null TenantId = '7271af30-bd30-4664-a407-c44dc3ca8b12' Title = $null UsageLocation = 'GB' UserDirSyncEnabled = $null UserPrincipalName = 'ReacherGilt@discworld.onmicrosoft.com' WhenChanged = $null } # Resource Accounts $CsOnlineApplicationInstanceGood1 = [PSCustomObject]@{ ApplicationId = '11cd3e2e-fccb-42ad-ad00-878b93575e07' DisplayName = 'Night Watch Emergency Line' ObjectId = 'b8f75f14-586b-4e05-9c97-7fa372e525c5' PhoneNumber = 'tel:+1234567890' TenantId = '7271af30-bd30-4664-a407-c44dc3ca8b12' UserPrincipalName = 'NightWatchRA@discworld.onmicrosoft.com' } $CsOnlineApplicationInstanceBad1 = [PSCustomObject]@{ ApplicationId = 'ce933385-9390-45d1-9512-c8d228074e07' DisplayName = 'Trunk Company Receptionist' ObjectId = '0a015c1c-7b15-41ea-a5ca-0605cb755524' PhoneNumber = $null TenantId = '7271af30-bd30-4664-a407-c44dc3ca8b12' UserPrincipalName = 'TrunkCompanyReceptionist@discworld.onmicrosoft.com' } # Azure Ad User $AzureAdUserRAGood1 = [PSCustomObject]@{ ExtensionProperty = [PSCustomObject]@{ 'odata.metadata' = 'https://graph.windows.net/7271af30-bd30-4664-a407-c44dc3ca8b12/$metadata#directoryObjects/@Element' 'odata.type' = 'Microsoft.DirectoryServices.User' createdDateTime = 'Tue 19 Jul 2022 17:53:06' employeeId = $null onPremisesDistinguishedName = $null userIdentities = @() } DeletionTimestamp = $null ObjectId = '6647e937-7617-443b-ba3b-364a140534f8' ObjectType = 'User' AccountEnabled = $False AgeGroup = $null AssignedLicenses = @( [PSCustomObject]@{ DisabledPlans = @() SkuId = 'c42b9cae-ea4f-4ab7-9717-81576235ccac' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc } ) AssignedPlans = @( [PSCustomObject]@{ DisabledPlans = @() SkuId = 'c42b9cae-ea4f-4ab7-9717-81576235ccac' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'exchange' ServicePlanId = '6dc145d6-95dd-4191-b9c3-185575ee6f6b' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'Sway' ServicePlanId = 'a23b959c - 7ce8-4e57-9140-b90eb88a9e97' }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'exchange' ServicePlanId = 'd2d51368 - 76c9-4317-ada2-a12c004c432f' } ) City = $null CompanyName = $null ConsentProvidedForMinor = $null Country = $null CreationType = $null Department = 'Microsoft Communication Application Instance' DirSyncEnabled = $null DisplayName = 'NightWatchRA' FacsimileTelephoneNumber = $null GivenName = $null IsCompromised = $null ImmutableId = $null JobTitle = $null LastDirSyncTime = $null LegalAgeGroupClassification = $null Mail = 'NightWatchRA@discworld.onmicrosoft.com' MailNickName = 'NightWatchRA' Mobile = $null OnPremisesSecurityIdentifier = $null OtherMails = @() PasswordPolicies = $null PasswordProfile = [PSCustomObject]@{ Password = $null ForceChangePasswordNextLogin = $True EnforceChangePasswordPolicy = $False } PhysicalDeliveryOfficeName = $null PostalCode = $null PreferredLanguage = $null ProvisionedPlans = @( [PSCustomObject]@{ CapabilityStatus = 'Enabled' ProvisioningStatus = 'Success' Service = 'MicrosoftCommunicationsOnline' }, [PSCustomObject]@{ CapabilityStatus = 'Enabled' ProvisioningStatus = 'Success' Service = 'SharePoint' }, [PSCustomObject]@{ CapabilityStatus = 'Enabled' ProvisioningStatus = 'Success' Service = 'exchange' } ) ProvisioningErrors = @() ProxyAddresses = { 'SMTP:NightWatchRA@discworld.onmicrosoft.com' } RefreshTokensValidFromDateTime = 'Tue 19 Jul 2022 17:53:05' ShowInAddressList = $null SignInNames = @() SipProxyAddress = 'NightWatchRA@discworld.onmicrosoft.com' State = $null StreetAddress = $null Surname = $null TelephoneNumber = $null UsageLocation = 'US' UserPrincipalName = 'NightWatchRA@discworld.onmicrosoft.com' UserState = $null UserStateChangedOn = $null UserType = 'Member' } $AzureAdUserRAToRemedy1 = [PSCustomObject]@{ ExtensionProperty = [PSCustomObject]@{ 'odata.metadata' = 'https://graph.windows.net/7271af30-bd30-4664-a407-c44dc3ca8b12/$metadata#directoryObjects/@Element' 'odata.type' = 'Microsoft.DirectoryServices.User' createdDateTime = 'Tue 19 Jul 2022 17:53:06' employeeId = $null onPremisesDistinguishedName = $null userIdentities = @() } DeletionTimestamp = $null ObjectId = '6647e937-7617-443b-ba3b-364a140534f8' ObjectType = 'User' AccountEnabled = $False AgeGroup = $null AssignedLicenses = @( [PSCustomObject]@{ DisabledPlans = @() SkuId = 'c42b9cae-ea4f-4ab7-9717-81576235ccac' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc } ) AssignedPlans = @( [PSCustomObject]@{ DisabledPlans = @() SkuId = 'c42b9cae-ea4f-4ab7-9717-81576235ccac' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'exchange' ServicePlanId = '6dc145d6-95dd-4191-b9c3-185575ee6f6b' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'Sway' ServicePlanId = 'a23b959c - 7ce8-4e57-9140-b90eb88a9e97' }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'exchange' ServicePlanId = 'd2d51368 - 76c9-4317-ada2-a12c004c432f' } ) City = $null CompanyName = $null ConsentProvidedForMinor = $null Country = $null CreationType = $null Department = 'Microsoft Communication Application Instance' DirSyncEnabled = $null DisplayName = 'NightWatchRA' FacsimileTelephoneNumber = $null GivenName = $null IsCompromised = $null ImmutableId = $null JobTitle = $null LastDirSyncTime = $null LegalAgeGroupClassification = $null Mail = 'NightWatchRA@discworld.onmicrosoft.com' MailNickName = 'NightWatchRA' Mobile = $null OnPremisesSecurityIdentifier = $null OtherMails = @() PasswordPolicies = $null PasswordProfile = [PSCustomObject]@{ Password = $null ForceChangePasswordNextLogin = $True EnforceChangePasswordPolicy = $False } PhysicalDeliveryOfficeName = $null PostalCode = $null PreferredLanguage = $null ProvisionedPlans = @( [PSCustomObject]@{ CapabilityStatus = 'Disabled' ProvisioningStatus = 'Success' Service = 'MicrosoftCommunicationsOnline' }, [PSCustomObject]@{ CapabilityStatus = 'Enabled' ProvisioningStatus = 'Success' Service = 'SharePoint' }, [PSCustomObject]@{ CapabilityStatus = 'Enabled' ProvisioningStatus = 'Success' Service = 'exchange' } ) ProvisioningErrors = @() ProxyAddresses = { 'SMTP:NightWatchRA@discworld.onmicrosoft.com' } RefreshTokensValidFromDateTime = 'Tue 19 Jul 2022 17:53:05' ShowInAddressList = $null SignInNames = @() SipProxyAddress = 'NightWatchRA@discworld.onmicrosoft.com' State = $null StreetAddress = $null Surname = $null TelephoneNumber = $null UsageLocation = 'US' UserPrincipalName = 'NightWatchRA@discworld.onmicrosoft.com' UserState = $null UserStateChangedOn = $null UserType = 'Member' } $AzureAdUserRABad1 = [PSCustomObject]@{ ExtensionProperty = [PSCustomObject]@{ 'odata.metadata' = 'https://graph.windows.net/7271af30-bd30-4664-a407-c44dc3ca8b12/$metadata#directoryObjects/@Element' 'odata.type' = 'Microsoft.DirectoryServices.User' createdDateTime = 'Tue 19 Jul 2022 17:53:06' employeeId = $null onPremisesDistinguishedName = $null userIdentities = @() } DeletionTimestamp = $null ObjectId = '6647e937-7617-443b-ba3b-364a140534f8' ObjectType = 'User' AccountEnabled = $False AgeGroup = $null AssignedLicenses = @( [PSCustomObject]@{ DisabledPlans = @() SkuId = 'c42b9cae-ea4f-4ab7-9717-81576235ccac' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc } ) AssignedPlans = @( [PSCustomObject]@{ DisabledPlans = @() SkuId = 'c42b9cae-ea4f-4ab7-9717-81576235ccac' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'exchange' ServicePlanId = '6dc145d6-95dd-4191-b9c3-185575ee6f6b' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'Sway' ServicePlanId = 'a23b959c - 7ce8-4e57-9140-b90eb88a9e97' }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'exchange' ServicePlanId = 'd2d51368 - 76c9-4317-ada2-a12c004c432f' } ) City = $null CompanyName = $null ConsentProvidedForMinor = $null Country = $null CreationType = $null Department = 'Microsoft Communication Application Instance' DirSyncEnabled = $null DisplayName = 'NightWatchRA' FacsimileTelephoneNumber = $null GivenName = $null IsCompromised = $null ImmutableId = $null JobTitle = $null LastDirSyncTime = $null LegalAgeGroupClassification = $null Mail = 'NightWatchRA@discworld.onmicrosoft.com' MailNickName = 'NightWatchRA' Mobile = $null OnPremisesSecurityIdentifier = $null OtherMails = @() PasswordPolicies = $null PasswordProfile = [PSCustomObject]@{ Password = $null ForceChangePasswordNextLogin = $True EnforceChangePasswordPolicy = $False } PhysicalDeliveryOfficeName = $null PostalCode = $null PreferredLanguage = $null ProvisionedPlans = @( [PSCustomObject]@{ CapabilityStatus = 'Enabled' ProvisioningStatus = 'Success' Service = 'SharePoint' }, [PSCustomObject]@{ CapabilityStatus = 'Enabled' ProvisioningStatus = 'Success' Service = 'exchange' } ) ProvisioningErrors = @() ProxyAddresses = { 'SMTP:NightWatchRA@discworld.onmicrosoft.com' } RefreshTokensValidFromDateTime = 'Tue 19 Jul 2022 17:53:05' ShowInAddressList = $null SignInNames = @() SipProxyAddress = 'NightWatchRA@discworld.onmicrosoft.com' State = $null StreetAddress = $null Surname = $null TelephoneNumber = $null UsageLocation = 'US' UserPrincipalName = 'NightWatchRA@discworld.onmicrosoft.com' UserState = $null UserStateChangedOn = $null UserType = 'Member' } # Users OK $AzureAdUserUserGood1 = [PSCustomObject]@{ ExtensionProperty = [PSCustomObject]@{ 'odata.metadata' = 'https://graph.windows.net/7271af30-bd30-4664-a407-c44dc3ca8b12/$metadata#directoryObjects/@Element' 'odata.type' = 'Microsoft.DirectoryServices.User' createdDateTime = 'Tue 19 Jul 2022 17:53:06' employeeId = $null onPremisesDistinguishedName = $null userIdentities = @() } DeletionTimestamp = $null ObjectId = '239943fa-1da2-4d80-8cec-cdd3c7239d2c' ObjectType = 'User' AccountEnabled = 'True' AgeGroup = $null AssignedLicenses = @( [PSCustomObject]@{ DisabledPlans = @() SkuId = 'c42b9cae-ea4f-4ab7-9717-81576235ccac' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc } ) AssignedPlans = @( [PSCustomObject]@{ DisabledPlans = @() SkuId = 'c42b9cae-ea4f-4ab7-9717-81576235ccac' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'exchange' ServicePlanId = '6dc145d6-95dd-4191-b9c3-185575ee6f6b' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'Sway' ServicePlanId = 'a23b959c - 7ce8-4e57-9140-b90eb88a9e97' }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'exchange' ServicePlanId = 'd2d51368 - 76c9-4317-ada2-a12c004c432f' } ) City = $null CompanyName = $null ConsentProvidedForMinor = $null Country = $null CreationType = $null Department = $null DirSyncEnabled = $null DisplayName = 'Sir Samuel Vimes' FacsimileTelephoneNumber = $null GivenName = 'Samuel' IsCompromised = $null ImmutableId = $null JobTitle = $null LastDirSyncTime = $null LegalAgeGroupClassification = $null Mail = 'SamVimes@discworld.onmicrosoft.com' MailNickName = 'SamVimes' Mobile = $null OnPremisesSecurityIdentifier = $null OtherMails = @() PasswordPolicies = 'None' PasswordProfile = $null PhysicalDeliveryOfficeName = $null PostalCode = $null PreferredLanguage = $null ProvisionedPlans = @( [PSCustomObject]@{ CapabilityStatus = 'Enabled' ProvisioningStatus = 'Success' Service = 'MicrosoftCommunicationsOnline' }, [PSCustomObject]@{ CapabilityStatus = 'Enabled' ProvisioningStatus = 'Success' Service = 'SharePoint' }, [PSCustomObject]@{ CapabilityStatus = 'Enabled' ProvisioningStatus = 'Success' Service = 'exchange' } ) ProvisioningErrors = @() ProxyAddresses = { 'SMTP:SamVimes@discworld.onmicrosoft.com' } RefreshTokensValidFromDateTime = 'Tue 31 May 2022 20:33:02' ShowInAddressList = $null SignInNames = @() SipProxyAddress = 'SamVimes@discworld.onmicrosoft.com' State = $null StreetAddress = $null Surname = 'Vimes' TelephoneNumber = $null UsageLocation = 'GB' UserPrincipalName = 'SamVimes@discworld.onmicrosoft.com' UserState = $null UserStateChangedOn = $null UserType = 'Member' } # PhoneSystem License Not Assigned $AzureAdUserUserBad1 = [PSCustomObject]@{ ExtensionProperty = [PSCustomObject]@{ 'odata.metadata' = 'https://graph.windows.net/7271af30-bd30-4664-a407-c44dc3ca8b12/$metadata#directoryObjects/@Element' 'odata.type' = 'Microsoft.DirectoryServices.User' createdDateTime = 'Tue 19 Jul 2022 17:53:06' employeeId = $null onPremisesDistinguishedName = $null userIdentities = @() } DeletionTimestamp = $null ObjectId = 'b233faf7-208d-47e2-8af2-5e5069f9aa91' ObjectType = 'User' AccountEnabled = $false AgeGroup = $null AssignedLicenses = @( [PSCustomObject]@{ DisabledPlans = @() SkuId = 'c42b9cae-ea4f-4ab7-9717-81576235ccac' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc } ) AssignedPlans = @( [PSCustomObject]@{ DisabledPlans = @() SkuId = 'c42b9cae-ea4f-4ab7-9717-81576235ccac' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'exchange' ServicePlanId = '6dc145d6-95dd-4191-b9c3-185575ee6f6b' # Swap for multiple scenarios E5, E3+PS, PSVU and bad: E3,etc }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'Sway' ServicePlanId = 'a23b959c - 7ce8-4e57-9140-b90eb88a9e97' }, [PSCustomObject]@{ AssignedTimestamp = 'Tue 19 Jul 2022 17:54:33' CapabilityStatus = 'Enabled' Service = 'exchange' ServicePlanId = 'd2d51368 - 76c9-4317-ada2-a12c004c432f' } ) City = $null CompanyName = $null ConsentProvidedForMinor = $null Country = $null CreationType = $null Department = $null DirSyncEnabled = $null DisplayName = 'Reacher Gilt' FacsimileTelephoneNumber = $null GivenName = 'Reacher' IsCompromised = $null ImmutableId = $null JobTitle = $null LastDirSyncTime = $null LegalAgeGroupClassification = $null Mail = 'ReacherGilt@discworld.onmicrosoft.com' MailNickName = 'ReacherGilt' Mobile = $null OnPremisesSecurityIdentifier = $null OtherMails = @() PasswordPolicies = 'None' PasswordProfile = $null PhysicalDeliveryOfficeName = $null PostalCode = $null PreferredLanguage = $null ProvisionedPlans = @( [PSCustomObject]@{ CapabilityStatus = 'Enabled' ProvisioningStatus = 'Success' Service = 'MicrosoftCommunicationsOnline' }, [PSCustomObject]@{ CapabilityStatus = 'Enabled' ProvisioningStatus = 'Success' Service = 'SharePoint' }, [PSCustomObject]@{ CapabilityStatus = 'Enabled' ProvisioningStatus = 'Success' Service = 'exchange' } ) ProvisioningErrors = @() ProxyAddresses = { 'SMTP:ReacherGilt@discworld.onmicrosoft.com' } RefreshTokensValidFromDateTime = 'Tue 31 May 2022 20:33:02' ShowInAddressList = $null SignInNames = @() SipProxyAddress = 'ReacherGilt@discworld.onmicrosoft.com' State = $null StreetAddress = $null Surname = 'Gilt' TelephoneNumber = $null UsageLocation = 'GB' UserPrincipalName = 'ReacherGilt@discworld.onmicrosoft.com' UserState = $null UserStateChangedOn = $null UserType = 'Member' } # Azure Ad Group #TODO what is considered a 'good' group? MailEnabled? How to check for a Microsoft 365 Group $AzureAdGroup = [PSCustomObject]@{ DeletionTimestamp = $null ObjectId = 'eba4dabb-dee2-4fcf-ba42-a191e0fdc6af' ObjectType = 'Group' Description = 'Committee for Equal Heights' DirSyncEnabled = $null DisplayName = 'Equal Heights' LastDirSyncTime = $null Mail = 'equalheights@discworld.onmicrosoft.com' MailEnabled = $True MailNickName = 'equalheights' OnPremisesSecurityIdentifier = $null ProvisioningErrors = @() ProxyAddresses = @('SMTP:equalheights@discworld.onmicrosoft.com') SecurityEnabled = $False } # Team $TeamGood = [PSCustomObject]@{ GroupId = '6c105977-d636-419a-b5f3-4885375e432a' InternalId = '19:6knN4Rzr3_NUiCsVwEtrHvYWbp_MzqbPp9fEyqujZVc1@thread.tacv2' DisplayName = 'Night Watch' Description = 'Night Watch' Visibility = 'Public' MailNickName = 'NightWatch' Classification = $null Archived = $False AllowGiphy = $True GiphyContentRating = 'moderate' AllowStickersAndMemes = $True AllowCustomMemes = $True AllowGuestCreateUpdateChannels = $False AllowGuestDeleteChannels = $False AllowCreateUpdateChannels = $True AllowCreatePrivateChannels = $True AllowDeleteChannels = $True AllowAddRemoveApps = $True AllowCreateUpdateRemoveTabs = $True AllowCreateUpdateRemoveConnectors = $True AllowUserEditMessages = $True AllowUserDeleteMessages = $True AllowOwnerDeleteMessages = $True AllowTeamMentions = $True AllowChannelMentions = $True ShowInTeamsSearchAndSuggestions = $True } # TeamChannel - Output of Get-TeamChanenl $TeamChannelGood = @( [PSCustomObject]@{ Id = '19:5e61bcffc0e54c5d915b17f6a0796a42@thread.tacv2' DisplayName = 'Night Watch - Duty Roster' Description = 'Duty roster for the Night Watch' MembershipType = 'Standard' }, [PSCustomObject]@{ Id = '19:6knN4Rzr3_NUiCsVwEtrHvYWbp_MzqbPp9fEyqujZVc1@thread.tacv2' DisplayName = 'General' Description = 'General Enquiries' MembershipType = 'Standard' }, [PSCustomObject]@{ Id = '19:e4236b10aa244631be8f16eb14c7d982@thread.tacv2' DisplayName = 'Night Watch - Noise Complaints' Description = 'Noise Complaints' MembershipType = 'Standard' } ) # Channel $ChannelGood = [PSCustomObject]@{ Id = '19:5e61bcffc0e54c5d915b17f6a0796a42@thread.tacv2' DisplayName = 'Night Watch - Duty Roster' Description = 'Duty roster for the Night Watch' MembershipType = 'Standard' } |