web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to set a content t...
Power Automate
Unanswered

How to set a content type as default in SharePoint library without deleting other Content type.

(0) ShareShare
ReportReport
Posted on by

Hi expects,

 

We initially create a new library in share point and added content type to the library. Now we need to make the newly added content type "TempContentType" as default content type, as there is already a another content type of "Document" is created initially on library creation.

Here we got making default content type by deleting others -  https://powerusers.microsoft.com/t5/General-Power-Automate/Set-a-new-default-content-type/m-p/1375031/highlight/true#M82278

 

So we need to make the newly created "TempContentType" as default content type without deleting other content types.

 

Thanks in advance.

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @Naveenav,


    I had another look at this and found that it should be possible via a POST request on the RootFolder of the list. So, no need to remove any existing content types, yay! 😁

     

    On that RootFolder you can set the UniqueContentTypeOrder property value. Kudos to Sorin Sandu with this blog to steer me into the right direction, https://tinysharepoint.wordpress.com/2021/02/01/change-content-type-order-using-uniquecontenttypeorder/

     

    Below is an example

     

    URI

     

    _api/web/lists/getbytitle('@{variables('ListName')}')/RootFolder

     

     

    Headers

     

    {
     "Accept": "application/json;odata=verbose",
     "Content-Type": "application/json;odata=verbose",
     "If-Match": "*",
     "X-HTTP-Method": "MERGE"
    }

     

     

    Body

     

    {
    "__metadata": { "type": "SP.Folder" },
    "UniqueContentTypeOrder": { 
    "__metadata": { "type": "Collection(SP.ContentTypeId)" },
     "results": [
     { "StringValue": "0x0120D52000D7B65730C11A7B4CB3E96056EEC49DCE0079469C975343344EA7EF1D3391006E14"}, 
     { "StringValue": "0x0100753374BDCA807E4888D2017054283F7A00F8313B858F09DB479E4C3142BAC545D0"}
     ]
    }
    }

     

     

    post_rootfolder.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard