I am working on "Getting properties of SharePoint Feature using CSOM in SharePoint Online".

Following is the code which I wrote :

            Password password = new Password();
            SecureString securePassword = new SecureString();
            securePassword = password.ConvertStringToSecureString();
            using (ClientContext context = new ClientContext("https://mysite"))

                Web web = context.Web;

                FeatureCollection featuresCollection = web.Features;


                foreach (Feature feature in featuresCollection)

                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.WriteLine("Feature Definition ID:{0}", feature.DefinitionId);


There is only one property feature.DefinitionId which I found for the feature object. Is there any way to get the other properties of feature?

PS- Can we do anything with featureDefinitionID and get the Feature Definition XML in Sharepoint Online?

1 Answer 1


CSOM Feature object exposes the following properties:

Such SSOM Feature properties as SPFeature.Definition or SPFeature.Properties are not available in CSOM/REST.

Below examples demonstrate how to manage features using CSOM

Example: how to retrieve activated (web scope) features:

var webFeatures = ctx.Web.Features;
ctx.Load(webFeatures,fcol => fcol.Include(f => f.DisplayName,f => f.DefinitionId));
foreach(var f in webFeatures)

Example: how to activate a feature

 ActivateWebFeature(ctx.Web, new Guid("94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb"),true); //active a Publishing feature


public static void ActivateWebFeature(Web web, Guid featureId, bool force)
    var ctx = web.Context;
    web.Features.Add(featureId, force, FeatureDefinitionScope.None);
  • 1
    @saikumar.tammisetty Please mark the answer as accepted if it solves your issue
    – grisha
    Jan 23, 2015 at 14:58
  • @grisha from my question it self i achived definitionid.but actually am expecting little more.i got an alternative using windows sharepoint services using soap call.am still awaiting for a better solution Jan 23, 2015 at 15:10
  • 1
    DisplayName is not a Feature Property in CSOM either.
    – Brian P
    Jul 21, 2015 at 18:59
  • 1
    @BrianP That's just incorrect. I was able to load the DisplayName using the above example by Vadmin-Gremyachev . This should be the accepted answer. Aug 3, 2015 at 4:40
  • Which version of the CSOM DLL are you using? I tested in both and
    – Brian P
    Aug 3, 2015 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.