Forum Discussion

    • Joe James's avatar
      Joe James
      Copper Contributor

      Yes, I did see that it was available through CSOM, but I was trying to figure out what would be the REST endpoint for this. Basically, I was trying to get the field updated from a Flow.

      • cfiessinger's avatar
        cfiessinger
        Icon for Microsoft rankMicrosoft

        Joe can you please share the end to end scenario you are trying to achieve?

  • boby5555_'s avatar
    boby5555_
    Copper Contributor
    Anyway update on this? I need to create a SPFX Extensions CommandSet that will apply a retention label on the selected items in a library.
  • TimHaydnJones's avatar
    TimHaydnJones
    Copper Contributor
    So, if we wrote some code to apply a retention label to files in SP using the REST API, the retention label would have been created 'automatically'. Does this mean that we would need an E5 licence? (in my opinion, the word 'automatically' is extremely ambiguous in this critical context). My initial (and I believe logical) reaction is that we would NOT need an E5 licence just because we chose to develop something using the REST API. The reason I say this, is that if we did need an E5 licence, then we'd barely need the REST API, because E5 would have brought with it the capability to automatically apply a retention label. Ergo, the very existence of the REST API suggests to me that we can use it within an E3 environment. Any views?
    • Joe James's avatar
      Joe James
      Copper Contributor

      TimHaydnJones 

      I don't think there will be a license implication for using the REST API. Consuming the available API and implementing your own automations should not require any additional licensing..

  • Rishi Gupta's avatar
    Rishi Gupta
    Brass Contributor
    Do we have API's which can be used to apply the retention labels for a SharePoint site or is there any alternate view to apply the retention labels programmatically on a site?
    • robertoy's avatar
      robertoy
      Icon for Microsoft rankMicrosoft

      Rishi Gupta You can set the values today on the columns but we do have in the roadmap a REST API that makes labeling simpler, stay tuned for that.

      • HerschelJ's avatar
        HerschelJ
        Brass Contributor
        Hello! I am looking for a way to GET/SET the Compliance Tag / Retention Label on a library level via API, is this possible? I would love to create a Power Automate to run on all newly created Teams/SharePoint sites and set the Retention Labels on their Documents library to adhere to our policy, ive found hundreds of examples on how to set on items, but I just want to set on the library itself. thanks!

Resources