0

I currently use PnP cmdlets to provision a Team Site and want to apply a PnP template that refers to a ContenType usually published by the ContentType Hub. Right now, when I try that, it usually fails because the newly created site was not provided with the ContentTypeHub ContentTypes.

I then started a retry loop to make sure the ContentType is available before applying the template. It becomes available after some time (ranging from 3 minutes to 2 hours)....

Is there a way to force the ContentType to be published on-demand? I already tried clearing the metadata timestamp (Set-PnPPropertyBagValue -key "metadatatimestamp" -value " ") but it did not help.

If not, since my end goal is to provision sites using Azure Function and execution seems limited to 10 minutes, is there a way to be notified when a contenttype is available (ex: webhook) and then trigger an Azure function?

Thanks a lot.

1
  • Sorry, content type can't be provisioned on demand. A webhook is also not available for notification :( , if possible to restructure, would suggest that you provision the content types via PnP templates only Jun 25, 2020 at 11:04

1 Answer 1

0

While Microsoft is investing in making improvements to the Content Type hub timer job, it isn't very performant. Depending on what stamp your tenant is provisioned on, this may be better or worse depending on the usage of the CT Hub by other tenants in the same stamp.

Otherwise, current state is you must wait for the job to complete which can take up to 72 hours. If it exceeds 72 hours, I would open a support case via admin.microsoft.com to see if they can help diagnose any potential issues with the timer job.

Your Answer

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

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