Skip to content

Applying sharing capabilities to a site fails with 'Type' attribute is invalid #1087

@plamber

Description

@plamber

Category

  • Bug

Describe the bug

When running this code passing the PnP.Core.Admin.Model.SharePoint SharingCapabilities

var tenantProperties = await pnpContext.GetSharePointAdmin().GetTenantPropertiesAsync();
tenantProperties.SharingCapability = capabilities;
await tenantProperties.UpdateAsync();

I am getting this type of exception.

The 'Type' attribute is invalid - The value 'List`1' is invalid according to its datatype 'http://schemas.microsoft.com/sharepoint/clientquery/2009:MethodParameterTypeType' - The Enumeration constraint failed.
ClientRequestId: bc8d93a0-b0ff-6000-32ba-0f79281160f8
ErrorTypeName: "System.Xml.Schema.XmlSchemaValidationException"

I noticed this error in 1.8.92. I haven't seen it in 1.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:admin 📜Admin library relatedquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions