Key cannot be null for AddFieldAsXml

I was using Office PnP library to create SPOField. I got “Key cannot be null” error. I checked all the options for the XML file. Finally this is the correct XML text worked for the call. Please note there should be default XML Namespace.

You will get same error if you are using the PowerShell Solutions from Office PnP

<?xml version=”1.0″ encoding=”utf-8″?>
<Field xmlns=”;
DisplayName=”Contoso Status”
Group=”Contoso Site Columns”>

About Pankaj

I am a Developer and my linked profile is
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s