Field or property "Audit" does not exist

%3CLINGO-SUB%20id%3D%22lingo-sub-20938%22%20slang%3D%22en-US%22%3EField%20or%20property%20%22Audit%22%20does%20not%20exist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-20938%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20using%20SharePointPnPCore2013%20Nuget%20Package%20to%20create%20a%20template%20xml%20using%20the%20method%20explained%20at%20the%20video%20below.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fchannel9.msdn.com%2Fblogs%2FOfficeDevPnP%2FGetting-Started-with-PnP-Provisioning-Engine%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fchannel9.msdn.com%2Fblogs%2FOfficeDevPnP%2FGetting-Started-with-PnP-Provisioning-Engine%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHowever%2C%20i%20get%20an%20error%20%22Field%20or%20property%20%22Audit%22%20does%20not%20exist%22%20at%26nbsp%3B%20GetProvisioningTemplate%20method.%20Can%20you%20please%20suggest%20me%20a%20way%20to%20get%20rid%20of%20this%20error%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-47483%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Field%20or%20property%20%22Audit%22%20does%20not%20exist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-47483%22%20slang%3D%22en-US%22%3EAttached%20the%20debugger%20to%20the%20PnP%20Core%2C%20found%20out%20the%20null%20object%20comes%20from%20Managed%20Metadata%20Service%20not%20running.%20After%20starting%20the%20service%2C%20I%20have%20passed%20that%20error%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-41520%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Field%20or%20property%20%22Audit%22%20does%20not%20exist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-41520%22%20slang%3D%22en-US%22%3E%3CP%3EVesa%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20am%20using%20the%20sample%20Provisioning.Framework.Console%2C%20I%20am%20able%20to%20export%20the%20template%2C%20but%20while%20importing%20I%20am%20receiving%20the%20null%20object%20error%20at%20applying%20the%20template.%26nbsp%3B%20I%20notice%20that%26nbsp%3Bthe%20nuget%20packages%20are%20not%20correct.%26nbsp%3B%20What%20are%20necessary%20the%20packages%20for%20on-prem%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EMicrosoft.SharePointOnline.CSOM%3CBR%20%2F%3EMicrosoft.SharePoint2013.CSOM%3CBR%20%2F%3EAppForSharePointOnlineWebToolkit%3CBR%20%2F%3EAppForSharePointWebToolkit%3CBR%20%2F%3ESharePointPnPCore2013%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EInstalling%20SharePointPnPCore2013%2C%20installs%20AppForSharePointOnlineWebToolkit%2C%20and%20there%20seems%20to%20be%20conflict%20in%20CSOM%20libraries%20as%20well.%26nbsp%3B%20Any%20pointer%20you%20provide%20will%20be%20helpful%2C%20also%20how%20do%20I%20about%20getting%20to%20the%20stack.%26nbsp%3B%20I%20do%20not%20see%20much%20on%20that%20specific%20line%2C%20both%20objects%20are%20not%20null%2C%20I%20am%20assuming%20it%20is%20to%20do%20with%20the%20CSOM%20library.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-41319%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Field%20or%20property%20%22Audit%22%20does%20not%20exist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-41319%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20really%20comes%20down%20on%20the%20code%20and%20template%20what%20you're%20using.%20I'd%20do%20following.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3EEnsure%20that%20code%20works%20-%20export%20%2F%20import%20oob%20team%20site%20without%20any%20modifications%3C%2FLI%3E%3CLI%3EIf%20that%20does%20not%20work%20-%20then%20there's%20something%20else%20environmental%2C%20like%20permissions%3C%2FLI%3E%3CLI%3EIf%20that%20works%20-%20issue%20is%20in%20the%20template%20side%20-%20so%20it's%20then%20matter%20of%20double%20checking%20the%20template%20content%20and%20figure%20out%20what%20goes%20wrong%3C%2FLI%3E%3C%2FOL%3E%3CP%3EWithout%20access%20on%20the%20used%20template%2C%20we%20can't%20reproduce%20which%20means%20that%20there's%20no%20way%20to%20be%20100%25%20what%20goes%20wrong.%26nbsp%3BWIth%20the%20exception%2C%20you%20should%20also%20get%20nice%20stack%20trace%2C%26nbsp%3Bwhich%20will%20give%20you%20and%20us%20insights%20on%20what%20%2F%20where%20issue%20occured.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-41301%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Field%20or%20property%20%22Audit%22%20does%20not%20exist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-41301%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%2C%20Vesa.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20installed%2Fapplied%20SP2013%20January%202017%20CU%2C%20I%20passed%20that%20error.%26nbsp%3B%20Now%2C%20it%20throws%20null%20pointer%20error%20at%20line%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eweb.ApplyProvisioningTemplate(template%2C%20ptai)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20ideas%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMalathi.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-41206%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Field%20or%20property%20%22Audit%22%20does%20not%20exist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-41206%22%20slang%3D%22en-US%22%3E%3CP%3EThere's%20two%20factors%20for%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3ERight%20PowerShell%2FNuget%20package%20-%20you'll%20need%20to%20use%20the%20specific%20version%2C%20like%20SP2013%20version%20for%20SP2013%3C%2FLI%3E%3CLI%3ERigth%20SP2013%20version%20being%20installed%20on%20the%20server%20side.%20Our%20baseline%20is%20April%202015%20CU%20-%20If%20you%20are%20using%20older%20version%20of%20the%20SP2013%20installation%2C%20you%20might%20run%20into%20issues%3C%2FLI%3E%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-41151%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20Field%20or%20property%20%22Audit%22%20does%20not%20exist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-41151%22%20slang%3D%22en-US%22%3E%3CP%3EI%20are%20using%20SharePointPnPCore2013%202.11.1701.1%20and%20I%20am%20still%20having%20issues.%26nbsp%3B%20Are%20there%20any%20other%20updates%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-22015%22%20slang%3D%22en-US%22%3ERE%3A%20Field%20or%20property%20%22Audit%22%20does%20not%20exist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-22015%22%20slang%3D%22en-US%22%3EThank%20you%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F369%22%20target%3D%22_blank%22%3E%40Vesa%20Juvonen%3C%2FA%3EI%20am%20using%20the%20Nuget%20Package%20for%20SharePoint%20On%20Premise%20named%20%22SharePointPnPCore2013%22%20.%20I%20installed%20June%202016%20CU%20and%20that%20seems%20to%20have%20helped.%20It%20is%20working%20fine%20now.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-22014%22%20slang%3D%22en-US%22%3ERE%3A%20Field%20or%20property%20%22Audit%22%20does%20not%20exist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-22014%22%20slang%3D%22en-US%22%3EHi%20Paul%20Thank%20you%20for%20your%20inputs.%20I%20was%20able%20to%20get%20rid%20of%20this%20error%20by%20installing%20June%202016%20CU%20on%20my%20SharePoint%20on%20premise%20environment.%20It%20works%20fine%20now%20and%20TemplateXML%20gets%20created%20successfully.%20However%2C%20I%20get%20some%20errors%20while%20applying%20template%20xml%20created%20for%20a%20Publishing%20site.%20Is%20there%20a%20way%20to%20skip%20the%20errors%20and%20proceed%20with%20rest%20of%20the%20steps%20while%20applying%20template%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-21938%22%20slang%3D%22en-US%22%3ERe%3A%20Field%20or%20property%20%22Audit%22%20does%20not%20exist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-21938%22%20slang%3D%22en-US%22%3E%3CP%3EThis%26nbsp%3Bseems%20to%20be%20due%20the%20fact%20that%20some%20of%20the%20CSOM%20properties%20are%20not%20available%20in%20on-premises%2C%20which%20are%20available%20in%20SharePoint%20Online.%20This%20particular%20code%20sample%20is%20built%20towards%20SP%20Online%2C%20so%20it%20is%20using%20Online%20CSOM%20by%20default.%20If%20you%20do%20not%20update%20the%20PnP%20Core%20Nuget%20package%20%26nbsp%3Bto%20matching%20on-premises%20version%20(2013%20or%202016)%2C%20you%20will%20see%20this%20kind%20of%20issues.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESo%20-%20how%20to%20fix%20it%3F%20-%20Update%20the%20PnP%20Core%20Nuget%20package%20reference%20to%20be%20for%20on-premises.%26nbsp%3BHere's%20a%20blog%20post%2C%20which%20explains%20the%20CSOM%20version%26nbsp%3Bchallenge%20in%20practice%20and%20which%20version%20should%20be%20used%20where%20-%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdev.office.com%2Fblogs%2Fusing-correct-csom-version-for-sharepoint-customizations.%26nbsp%3B%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdev.office.com%2Fblogs%2Fusing-correct-csom-version-for-sharepoint-customizations.%26nbsp%3B%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-21145%22%20slang%3D%22en-US%22%3ERE%3A%20Field%20or%20property%20%22Audit%22%20does%20not%20exist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-21145%22%20slang%3D%22en-US%22%3EHi%20Prasad%2C%20so%20code%20is%20running%20fine%20on%20Office365%3F%20did%20you%20change%20the%20library%20to%20On%20premm%20with%20PNP%3F%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F369%22%20target%3D%22_blank%22%3E%40Vesa%20Juvonen%3C%2FA%3Eany%20idea%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-21100%22%20slang%3D%22en-US%22%3ERE%3A%20Field%20or%20property%20%22Audit%22%20does%20not%20exist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-21100%22%20slang%3D%22en-US%22%3EHi%20Paul.%20Thank%20you%20for%20getting%20back%20to%20me.%20Answers%20below.%201.%20I%20get%20an%20error%20while%20exporting%20the%20site%202.%20It%20is%20a%20POC.%20So%20I%20have%20created%20a%20site%20collection%20using%20OOB%20Team%20site%20as%20template%20and%20trying%20to%20save%20the%20site%20as%20xml%20using%20the%20PnP%20Provisioning%20Engine.%203.%20I%20am%20trying%20to%20provision%20a%20site%20collection.%204.%20There%20are%20no%20additional%20content%20types%20added.%20Site%20has%20only%20those%20elements%20created%20as%20part%20of%20the%20site%20creation%205.%20I%20use%20a%20multi%20tenant%20environment.%20Does%20that%20have%20an%20impact%3F%206.%20I%20did%20try%20the%20same%20steps%20on%20an%20Office%20365%20site%20(using%20corresponding%20nuget%20package)%2C%20it%20worked%20fine%20without%20any%20error.%20I%20face%20this%20issue%20only%20on%20SharePoint%20On%20Premise.%20Happy%20to%20provide%20any%20additional%20information.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-20965%22%20slang%3D%22en-US%22%3ERe%3A%20Field%20or%20property%20%22Audit%22%20does%20not%20exist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-20965%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Prasad%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20seems%20the%20custom%20column%20does%20not%20yet%20exist.%20But%20just%20a%20questoin%20did%20you%20first%20get%20a%20export%20of%20a%20site%20or%20did%20you%20start%20from%20scratch%3F%20and%20are%20you%20provisioning%20a%20subsite%20or%20a%20site.%20Do%20you%20use%20content%20types%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eso%20a%20bit%20more%20info%20would%20be%20helpfull.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Deleted
Not applicable

I am using SharePointPnPCore2013 Nuget Package to create a template xml using the method explained at the video below.

https://channel9.msdn.com/blogs/OfficeDevPnP/Getting-Started-with-PnP-Provisioning-Engine

 

However, i get an error "Field or property "Audit" does not exist" at  GetProvisioningTemplate method. Can you please suggest me a way to get rid of this error?

 

12 Replies

Hi Prasad,

 

It seems the custom column does not yet exist. But just a questoin did you first get a export of a site or did you start from scratch? and are you provisioning a subsite or a site. Do you use content types?

 

so a bit more info would be helpfull.

 

Hi Paul. Thank you for getting back to me. Answers below. 1. I get an error while exporting the site 2. It is a POC. So I have created a site collection using OOB Team site as template and trying to save the site as xml using the PnP Provisioning Engine. 3. I am trying to provision a site collection. 4. There are no additional content types added. Site has only those elements created as part of the site creation 5. I use a multi tenant environment. Does that have an impact? 6. I did try the same steps on an Office 365 site (using corresponding nuget package), it worked fine without any error. I face this issue only on SharePoint On Premise. Happy to provide any additional information.
Hi Prasad, so code is running fine on Office365? did you change the library to On premm with PNP? @Vesa Juvonen any idea?

This seems to be due the fact that some of the CSOM properties are not available in on-premises, which are available in SharePoint Online. This particular code sample is built towards SP Online, so it is using Online CSOM by default. If you do not update the PnP Core Nuget package  to matching on-premises version (2013 or 2016), you will see this kind of issues.

 

So - how to fix it? - Update the PnP Core Nuget package reference to be for on-premises. Here's a blog post, which explains the CSOM version challenge in practice and which version should be used where - https://dev.office.com/blogs/using-correct-csom-version-for-sharepoint-customizations. 

Hi Paul Thank you for your inputs. I was able to get rid of this error by installing June 2016 CU on my SharePoint on premise environment. It works fine now and TemplateXML gets created successfully. However, I get some errors while applying template xml created for a Publishing site. Is there a way to skip the errors and proceed with rest of the steps while applying template?
Thank you @Vesa Juvonen I am using the Nuget Package for SharePoint On Premise named "SharePointPnPCore2013" . I installed June 2016 CU and that seems to have helped. It is working fine now.

I are using SharePointPnPCore2013 2.11.1701.1 and I am still having issues.  Are there any other updates?

There's two factors for this.

 

  1. Right PowerShell/Nuget package - you'll need to use the specific version, like SP2013 version for SP2013
  2. Rigth SP2013 version being installed on the server side. Our baseline is April 2015 CU - If you are using older version of the SP2013 installation, you might run into issues

Thank you, Vesa.

 

I installed/applied SP2013 January 2017 CU, I passed that error.  Now, it throws null pointer error at line

 

web.ApplyProvisioningTemplate(template, ptai);

 

Any ideas?

 

Malathi.

This really comes down on the code and template what you're using. I'd do following.

 

  1. Ensure that code works - export / import oob team site without any modifications
  2. If that does not work - then there's something else environmental, like permissions
  3. If that works - issue is in the template side - so it's then matter of double checking the template content and figure out what goes wrong

Without access on the used template, we can't reproduce which means that there's no way to be 100% what goes wrong. WIth the exception, you should also get nice stack trace, which will give you and us insights on what / where issue occured.

Vesa

 

I am using the sample Provisioning.Framework.Console, I am able to export the template, but while importing I am receiving the null object error at applying the template.  I notice that the nuget packages are not correct.  What are necessary the packages for on-prem?

 

Microsoft.SharePointOnline.CSOM
Microsoft.SharePoint2013.CSOM
AppForSharePointOnlineWebToolkit
AppForSharePointWebToolkit
SharePointPnPCore2013

 

Installing SharePointPnPCore2013, installs AppForSharePointOnlineWebToolkit, and there seems to be conflict in CSOM libraries as well.  Any pointer you provide will be helpful, also how do I about getting to the stack.  I do not see much on that specific line, both objects are not null, I am assuming it is to do with the CSOM library.

 

Attached the debugger to the PnP Core, found out the null object comes from Managed Metadata Service not running. After starting the service, I have passed that error