'System.MissingMethodException: Method not found: 'System.String Microsoft.SharePoint.Client.Site.get_Classification()' in csom package

Dineshkumar T 0 Reputation points

I'm facing method not found exception while accessing the some properties in Microsoft.SharePoint.Client.Site

A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
8,564 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,469 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 26,791 Reputation points Microsoft Vendor

    Hi @Dineshkumar T,

    Per my test, there is no Microsoft.SharePoint.Client.Site.get_Classification() function in CSOM. If you want to get site classification, you could refer to following code

    // Connect to the admin central of your tenant
    using (var adminContext = new ClientContext("https://[tenant]-admin.sharepoint.com/"))
        // Provide a valid set of credentials
        adminContext.Credentials = OfficeDevPnP.Core.Utilities.CredentialManager.GetSharePointOnlineCredential("[name-of-your-credentials]");
        // Create a new instance of the Tenant class of CSOM
        var tenant = new Tenant(adminContext);
        // Get an Azure AD Access Token using ADAL, MSAL, or whatever else you like
        var accessToken = getAzureADAccessToken();
        // Retrieve the current set of values for site classification
        var classificationList = tenant.GetSiteClassificationList(accessToken); 

    Here is the document for details



    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.