-
Notifications
You must be signed in to change notification settings - Fork 645
SPOTenantSettings - OneDriveSharingCapability throws error in Set-TargetResource #5933
Description
Description of the issue
When applying SPOTenantSettings I received the following error-message which I haven't seen before.
PowerShell DSC resource MSFT_SPOTenantSettings failed to execute Set-TargetResource functionality with error message: {
"odata.error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"T
he property 'OneDriveSharingCapability' does not exist on type 'Microsoft.Online.SharePoint.TenantAdministration.Tenant'
. Make sure to only use property names that are defined by the type."}}}
It's been a while and this may be the first time I've used the resource since it was changed to use Invoke-PnPSPRestMethod. Maybe this property should be removed from the resource in the next 'breaking release'.
It already exists in SPOSharingSettings where it is called MySiteSharingCapability.
FWIW, the property is not defined in the configuration being applied.
Microsoft 365 DSC Version
DEV
Which workloads are affected
SharePoint Online
The DSC configuration
SPOTenantSettings "SPOTenantSettings"
{
ApplicationId = $ConfigurationData.NonNodeData.ApplicationId;
ApplyAppEnforcedRestrictionsToAdHocRecipients = $True;
CertificateThumbprint = $ConfigurationData.NonNodeData.CertificateThumbprint;
CommentsOnSitePagesDisabled = $False;
Ensure = "Present";
ExemptNativeUsersFromTenantLevelRestricedAccessControl = $False;
FilePickerExternalImageSearchEnabled = $True;
HideDefaultThemes = $False;
IsSingleInstance = "Yes";
LegacyAuthProtocolsEnabled = $False;
MarkNewFilesSensitiveByDefault = "AllowExternalSharing";
MaxCompatibilityLevel = "15";
MinCompatibilityLevel = "15";
NotificationsInSharePointEnabled = $True;
OfficeClientADALDisabled = $False;
OwnerAnonymousNotification = $True;
PublicCdnAllowedFileTypes = "CSS,EOT,GIF,ICO,JPEG,JPG,JS,MAP,PNG,SVG,TTF,WOFF";
PublicCdnEnabled = $False;
SearchResolveExactEmailOrUPN = $False;
SignInAccelerationDomain = "";
SocialBarOnSitePagesDisabled = $False;
TenantDefaultTimezone = "(UTC+01:00) Brussels, Copenhagen, Madrid, Paris";
TenantId = $OrganizationName;
UseFindPeopleInPeoplePicker = $False;
UsePersistentCookiesForExplorerView = $False;
}