Microsoft365DSC
Microsoft365DSC copied to clipboard
PlannerPlan & PlannerTask: System.Exception: [InvalidAuthenticationToken] : Lifetime validation failed, the token is expired.
Description of the issue
Export-M365DSCConfiguration -Components @("AADAdministrativeUnit", "AADApplication", "AADAttributeSet", "AADAuthenticationContextClassReference", "AADAuthenticationMethodPolicy", "AADAuthenticationMethodPolicyAuthenticator", "AADAuthenticationMethodPolicyEmail", "AADAuthenticationMethodPolicyFido2", "AADAuthenticationMethodPolicySms", "AADAuthenticationMethodPolicySoftware", "AADAuthenticationMethodPolicyTemporary", "AADAuthenticationMethodPolicyVoice", "AADAuthenticationMethodPolicyX509", "AADAuthenticationStrengthPolicy", "AADAuthorizationPolicy", "AADConditionalAccessPolicy", "AADCrossTenantAccessPolicy", "AADCrossTenantAccessPolicyConfigurationDefault", "AADCrossTenantAccessPolicyConfigurationPartner", "AADEntitlementManagementAccessPackage", "AADEntitlementManagementAccessPackageAssignmentPolicy", "AADEntitlementManagementAccessPackageCatalog", "AADEntitlementManagementAccessPackageCatalogResource", "AADEntitlementManagementConnectedOrganization", "AADExternalIdentityPolicy", "AADGroup", "AADGroupLifecyclePolicy", "AADGroupsNamingPolicy", "AADGroupsSettings", "AADNamedLocationPolicy", "AADRoleDefinition", "AADRoleEligibilityScheduleRequest", "AADRoleSetting", "AADSecurityDefaults", "AADServicePrincipal", "AADSocialIdentityProvider", "AADTenantDetails", "AADTokenLifetimePolicy", "AADUser", "ODSettings", "PlannerBucket", "PlannerPlan", "PlannerTask", "PPPowerAppsEnvironment", "PPTenantIsolationSettings", "PPTenantSettings", "SCAuditConfigurationPolicy", "SCAutoSensitivityLabelPolicy", "SCAutoSensitivityLabelRule", "SCCaseHoldPolicy", "SCCaseHoldRule", "SCComplianceCase", "SCComplianceSearch", "SCComplianceSearchAction", "SCComplianceTag", "SCDeviceConditionalAccessPolicy", "SCDeviceConfigurationPolicy", "SCDLPCompliancePolicy", "SCDLPComplianceRule", "SCFilePlanPropertyAuthority", "SCFilePlanPropertyCategory", "SCFilePlanPropertyCitation", "SCFilePlanPropertyDepartment", "SCFilePlanPropertyReferenceId", "SCFilePlanPropertySubCategory", "SCLabelPolicy", "SCProtectionAlert", "SCRetentionCompliancePolicy", "SCRetentionComplianceRule", "SCRetentionEventType", "SCSecurityFilter", "SCSensitivityLabel", "SCSupervisoryReviewPolicy", "SCSupervisoryReviewRule") -Credential $Credential -Path $FilePath -FileName $FileName
[41/74] Extracting [PlannerBucket] using {Credentials}... <<< works OK >>> [3599/3599] @@@DATA@@@ [42/74] Extracting [PlannerPlan] using {Credentials}...❌ Error Log created at {file://C:/O365Backups/AAD/cwd/11936-M365DSC-ErrorLog.log} [43/74] Extracting [PlannerTask] using {Credentials}...❌ Error Log created at {file://C:/O365Backups/AAD/cwd/11936-M365DSC-ErrorLog.log} [44/74] Extracting [PPPowerAppsEnvironment] using {Credentials}... |---[1/8] @@DATA@@✅
[2024/03/05 04:00:00] {InvalidOperation} System.Exception: [InvalidAuthenticationToken] : Lifetime validation failed, the token is expired. "Error during Export:" at Get-MgGroup<Process>, C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Groups\2.14.1\exports\ProxyCmdletDefinitions.ps1: line 45181 at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.228.1\DSCResources\MSFT_PlannerPlan\MSFT_PlannerPlan.psm1: line 372 at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.228.1\Modules\M365DSCReverse.psm1: line 649 at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.228.1\Modules\M365DSCUtil.psm1: line 1357 at <ScriptBlock>, C:\O365Backups\Backup_AAD.ps1: line 28
[2024/03/05 04:00:01] {InvalidOperation} System.Exception: [InvalidAuthenticationToken] : Lifetime validation failed, the token is expired. "Error during Export:" at Get-MgGroup<Process>, C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Groups\2.14.1\exports\ProxyCmdletDefinitions.ps1: line 45181 at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.228.1\DSCResources\MSFT_PlannerTask\MSFT_PlannerTask.psm1: line 712 at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.228.1\Modules\M365DSCReverse.psm1: line 649 at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.228.1\Modules\M365DSCUtil.psm1: line 1357 at <ScriptBlock>, C:\O365Backups\Backup_AAD.ps1: line 28
Microsoft 365 DSC Version
1.24.228.1
Which workloads are affected
Planner
The DSC configuration
Export-M365DSCConfiguration -Components @("AADAdministrativeUnit", "AADApplication", "AADAttributeSet", "AADAuthenticationContextClassReference", "AADAuthenticationMethodPolicy", "AADAuthenticationMethodPolicyAuthenticator", "AADAuthenticationMethodPolicyEmail", "AADAuthenticationMethodPolicyFido2", "AADAuthenticationMethodPolicySms", "AADAuthenticationMethodPolicySoftware", "AADAuthenticationMethodPolicyTemporary", "AADAuthenticationMethodPolicyVoice", "AADAuthenticationMethodPolicyX509", "AADAuthenticationStrengthPolicy", "AADAuthorizationPolicy", "AADConditionalAccessPolicy", "AADCrossTenantAccessPolicy", "AADCrossTenantAccessPolicyConfigurationDefault", "AADCrossTenantAccessPolicyConfigurationPartner", "AADEntitlementManagementAccessPackage", "AADEntitlementManagementAccessPackageAssignmentPolicy", "AADEntitlementManagementAccessPackageCatalog", "AADEntitlementManagementAccessPackageCatalogResource", "AADEntitlementManagementConnectedOrganization", "AADExternalIdentityPolicy", "AADGroup", "AADGroupLifecyclePolicy", "AADGroupsNamingPolicy", "AADGroupsSettings", "AADNamedLocationPolicy", "AADRoleDefinition", "AADRoleEligibilityScheduleRequest", "AADRoleSetting", "AADSecurityDefaults", "AADServicePrincipal", "AADSocialIdentityProvider", "AADTenantDetails", "AADTokenLifetimePolicy", "AADUser", "ODSettings", "PlannerBucket", "PlannerPlan", "PlannerTask", "PPPowerAppsEnvironment", "PPTenantIsolationSettings", "PPTenantSettings", "SCAuditConfigurationPolicy", "SCAutoSensitivityLabelPolicy", "SCAutoSensitivityLabelRule", "SCCaseHoldPolicy", "SCCaseHoldRule", "SCComplianceCase", "SCComplianceSearch", "SCComplianceSearchAction", "SCComplianceTag", "SCDeviceConditionalAccessPolicy", "SCDeviceConfigurationPolicy", "SCDLPCompliancePolicy", "SCDLPComplianceRule", "SCFilePlanPropertyAuthority", "SCFilePlanPropertyCategory", "SCFilePlanPropertyCitation", "SCFilePlanPropertyDepartment", "SCFilePlanPropertyReferenceId", "SCFilePlanPropertySubCategory", "SCLabelPolicy", "SCProtectionAlert", "SCRetentionCompliancePolicy", "SCRetentionComplianceRule", "SCRetentionEventType", "SCSecurityFilter", "SCSensitivityLabel", "SCSupervisoryReviewPolicy", "SCSupervisoryReviewRule") -Credential $Credential -Path $FilePath -FileName $FileName
Verbose logs showing the problem
[2024/03/05 04:00:00]
{InvalidOperation}
System.Exception: [InvalidAuthenticationToken] : Lifetime validation failed, the token is expired.
"Error during Export:"
at Get-MgGroup<Process>, C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Groups\2.14.1\exports\ProxyCmdletDefinitions.ps1: line 45181
at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.228.1\DSCResources\MSFT_PlannerPlan\MSFT_PlannerPlan.psm1: line 372
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.228.1\Modules\M365DSCReverse.psm1: line 649
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.228.1\Modules\M365DSCUtil.psm1: line 1357
at <ScriptBlock>, C:\O365Backups\Backup_AAD.ps1: line 28
[2024/03/05 04:00:01]
{InvalidOperation}
System.Exception: [InvalidAuthenticationToken] : Lifetime validation failed, the token is expired.
"Error during Export:"
at Get-MgGroup<Process>, C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Groups\2.14.1\exports\ProxyCmdletDefinitions.ps1: line 45181
at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.228.1\DSCResources\MSFT_PlannerTask\MSFT_PlannerTask.psm1: line 712
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.228.1\Modules\M365DSCReverse.psm1: line 649
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.228.1\Modules\M365DSCUtil.psm1: line 1357
at <ScriptBlock>, C:\O365Backups\Backup_AAD.ps1: line 28
Environment Information + PowerShell Version
OsName : Microsoft Windows Server 2019 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture : 64-bit
WindowsVersion : 1809
WindowsBuildLabEx : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage : en-US
OsMuiLanguages : {en-US}
Key : PSVersion
Value : 5.1.17763.5458
Name : PSVersion
Key : PSEdition
Value : Desktop
Name : PSEdition
Key : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0...}
Name : PSCompatibleVersions
Key : BuildVersion
Value : 10.0.17763.5458
Name : BuildVersion
Key : CLRVersion
Value : 4.0.30319.42000
Name : CLRVersion
Key : WSManStackVersion
Value : 3.0
Name : WSManStackVersion
Key : PSRemotingProtocolVersion
Value : 2.3
Name : PSRemotingProtocolVersion
Key : SerializationVersion
Value : 1.1.0.1
Name : SerializationVersion