Jul 12 2020 07:48 PM
We can turn this feature on via PowerShell PnP, but need to do it via PowerAutomate REST API call.
I have the following...see attached image...for our FLOW REST API call.
When I run the FLOW I get:
Aug 31 2020 04:42 PM
@Chip Cooper I think you are missing /feature/add.
Excerpt:
// Enables site collection feature (Site scoped feature)
function EnableSiteCollectionFeature(){
var featuresURI = sitecollectionURL + "/_api/site/features/add('151d22d9-95a8-4904-a0a3-22e4db85d1e0')"; // Cross-Site Collection Publishing Feature ID
$.ajax({
url: featuresURI,
method: 'POST',
headers: {
"Accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
},
success: function (data) {
console.log("Feature Activated");
},
error: function(data) {
console.log(data.responseJSON.error.message.value);
}
});
}