SharePoint Autofill columns have seen significant changes under the hood over the past year, and this blog is long overdue! In my earlier posts, I explained how Autofill‑enabled column configuration was stored in the library property bag as a single JSON array — a setup that made scaling and updating prompts cumbersome. In this post, I’ll show you the new automation scenarios that make managing Autofill columns far easier.

What has happened now is the Autofill prompt for a field is now stored with the field in a property called AutofillInfo (see below) and now no longer stored altogether in the list properties!

Apologies – this long-overdue blog has been sitting in my drafts for nearly a year while I waited for the column changes to settle down!
Now that the column changes seem to have settled, I’m sharing some programmatic options for automating Autofill columns—whether as list columns, site columns, or within Content Types at either the Site level or the global Content Type Hub.
It is great that Site Columns can also be programmatically be enabled for Autofill columns and a prompt added! This site column could then be added to multiple libraries and the configuration for the column including Autofill prompt is stored centrally. So that any changes to the site column i.e. updated Autofill prompt can then be automatically pushed to any libraries using the shared site column rather than having to update every library where the column is used! This opens up so much potential!
Also site columns are used in the Content Type Gallery in your SharePoint admin centre where you can centrally create and manage content types and publish them across site collections. Since columns are the backbone of content types, I thought: what if I could add an Autofill column to a content type in the gallery and push both the column and its Autofill configuration to other sites? Even better—if the Autofill prompt needs updating, I could change it once in the gallery and push those updates to every content type using that column. Now, you can do exactly that!”
The Caveats
- These API endpoints are un-documented and unpublished – so are subject to change at any point in time so may stop working or the calls may change!
- One more caveat: if you add an Autofill-enabled site column programmatically to a new library where Autofill hasn’t been used before, the configuration—although stored in the field properties—won’t take effect until you open and save the column settings. This awakens the library for Autofill – until then, Autofill won’t appear in the library’s top navigation.
- Below is the special bit of code I use to do this programmatically and grab the Autofill configuration of a field in the library then re-apply it
I do hope that in the future, you won’t need to visit the library and re-save the column configuration, either through code or manually, every time you initially add a Site Column with an Autofill configuration prompt to a new library
The ideal scenario would be that simply adding an Autofill-enabled column to a library will automatically trigger the background process to enable Autofill for the library.”
Scripts for Autofill Scenarios
I will now provide some scripts for automating Autofill columns in SharePoint with scenarios you’re likely to encounter—such as creating list or site columns with Autofill prompts from scratch, updating prompts on existing columns, and publishing Autofill‑enabled content types from the Content Type Hub
Script One : Add A List Column To A Library Then Apply Autofill Settings
This script demonstrates how to create a new list column in a library, then build the JSON payload that includes the Autofill prompt along with metadata about the field and library. That payload is sent as a POST request to _api/machinelearning/SetColumnLLMInfo using the SharePoint REST API. Once submitted, the column is configured for Autofill and the library is activated for Autofill.
Script Two : Add Autofill To A Site Column Then Add to A Library
This script creates an Autofill‑enabled site column and applies the Autofill configuration—including the prompt—via the AutofillInfo field property. It then adds the column to a document library and uses a required workaround: calling the _api/machinelearning/SetColumnLLMInfo endpoint to re‑apply the Autofill settings. This extra step is currently necessary to activate Autofill on the library. Finally, the script adds both the new site column and the processing status column to the library’s default view.
Script Three : Activate A File For Autofill Processing
This script I have previously published on my blog but this enables files to be programmatically queued up for re-processing – rather than selecting the file and pressing an Autofill button (see picture).

Script Four: Create a Hub Content Type, Add an Autofill Site Column, Publish It, Deploy to a Library, and Trigger Autofill Activation
This script creates a new content type in the global Content Type Hub, provisions an Autofill‑powered site column, and adds it to that content type. After publishing the content type tenant‑wide, it connects to the destination site, pulls the published content type down from the hub, and adds it to the target library. To activate Autofill on the library, the script as a workaround grabs the column’s AutofillInfo property including prompt and then re-applies it using SPO REST. Finally, it updates the default view on the library to include both the Autofill site column and the PrimeClassificationStatus processing status.
Script Five: Update Autofill Prompt On An Existing Site Column
This script updates the Autofill configuration on an existing site column by applying a new prompt in the column’s AutofillInfo property while keeping Autofill enabled. It connects to the target site, retrieves the column by its internal name, updates the prompt, and propagates the changes to all libraries and content types that reference the column.
Script Six: Update Autofill Prompt On Site Column in Content Type Hub Then Push To Destination Site/Library
This script updates the Autofill prompt on an existing site column in the Content Type Hub and pushes the change to a destination site. It connects to the hub, retrieves the specified content type and site column, applies the new prompt in the column’s AutofillInfo property, and propagates the update across associated content types. After publishing the updated content type tenant‑wide, the script connects to the target site and pulls the latest Content Type from the Content Type Hub, ensuring the destination library reflects the updated Autofill configuration.
Summary
This post covers practical automation patterns for SharePoint Autofill columns—so you can deploy and manage them consistently across sites and libraries. We walk through creating list and site columns with Autofill prompts, updating prompts on existing columns, publishing Autofill‑enabled content types from the Content Type Hub, and enabling Autofill processing on libraries via the SharePoint REST API. These scripts will save lots of manual effort and allow you to make changes at scale – along with bring the great Autofill columns into your Information Architecture (IA)
You may also be exploring the SharePoint Knowledge Agent, currently in public preview, which includes an “Organize this library” feature. This suggests Autofill columns based on your content—a fantastic way to empower end users to create columns (though governance considerations are essential!). While this UI-driven approach is great for flexibility, the scripts above give you the ability to manage Autofill columns at scale, ensuring consistency and automation across your environment.
I’d love to hear how you’re using Autofill—share your scenarios, edge cases, or improvements in the comments.