-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPOBrowserIdleSignout (and more): Not working #5648
Comments
Found another one, this time was SPOSharingSettings with error message Method invocation failed because [Microsoft.Online.SharePoint.TenantManagement.SharingCapabilities] does not contain a method named 'Replace' EDIT: TeamsEmergencyCallingPolicy gives [Microsoft.Teams.Policy.Administration.Cmdlets.Core.ExternalLocationLookupMode] does not contain a method named 'Replace' |
I know why that is: The MOF schema defines the property as a String, in which they also get implicitly converted during the export. But when running the Do you want me to update the New version of return @{
IsSingleInstance = 'Yes'
Enabled = $BrowserIdleSignout.Enabled
SignOutAfter = $BrowserIdleSignout.SignOutAfter.ToString() # Added ToString()
WarnAfter = $BrowserIdleSignout.WarnAfter.ToString() # Added ToString()
Credential = $Credential
....
} |
@FabienTschanz Problem with that solution is that there will always be new resources popping up with the same issue. I'm currently testing a diff, if it works I'll raise the PR with it. |
It's always an excruciating pain for me trying to run my tests and there's always something else breaking which then takes me several more hours in order to run everything again. Anyway #5651 fixes this. |
Agree that the fix proposed by @ricmestre is a more structural solution. However, I also think that making sure the exported value actually matches the schema is important as well. Was already working on a PR that fixes the type conversions for SPOSharingSettings. Will include the SPOBrowserIdleSignout as well. |
I'm wondering how you can fix small things in SharePoint if exporting it hasn't worked since September 9, 2024. Maybe we are doing something wrong or PnPOnline is no longer working. |
Description of the issue
If resource in the tenant matches the one in the blueprint there's no problems, but if there's a change then the test will spit out an error message about Method invocation failed because [System.TimeSpan] does not contain a method named 'Replace'
@FabienTschanz This is happening because of your commit 4090f74 to align line breaks, effectively this breaks on any resource that has a time span property of type TimeSpan instead of string which happens more often. Could you please check this?
EDIT: I've just checked and in fact the property is actually of type String, yet somehow when it reaches Test-M365DSCParameterState even with $desiredType.Name being String it interprets it as a TimeSpan and errors out.
Microsoft 365 DSC Version
1.25.115.1
Which workloads are affected
SharePoint Online
The DSC configuration
Verbose logs showing the problem
N/A
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: