Azure AI Search's SharePoint Online indexer does not index custom metadata columns, why?

Manu 15 Reputation points
2025-03-22T05:14:56.62+00:00

I have a document library with custom columns named "ProjectNumber" and "OwningDept". When indexed using the REST API, the index value is always NULL. What can I do to fix this?

Relevant setup info:

@Data source creation -

"container" : { "name" : "useQuery", "query" : "includeLibrary=https:./Forms/AllItems.aspx;additionalColumns=ProjectNumber,OwningDept" }

@Index creation -

{ "name": "ProjectNumber", "type": "Edm.String", "searchable": true, "filterable": false, "sortable": false, "facetable": false },
        { "name": "OwningDept", "type": "Edm.String", "searchable": true, "filterable": true, "sortable": false, "facetable": false }

@Indexer creation -

    "fieldMappings" : [
        { 
          "sourceFieldName" : "metadata_spo_site_library_item_id", 
          "targetFieldName" : "id", 
          "mappingFunction" : { 
            "name" : "base64Encode" 
          } 
        },
        { 
          "sourceFieldName" : "ProjectNumber"
        },
        { 
          "sourceFieldName" : "OwningDept"
        }
    ]

Source has ProjectNumber and OwningDept -

User's image

Result from Search Explorer

  "value": [
    {
      "@search.score": 1,
      "id": "...Z2Vvc...",
      "metadata_spo_item_name": "analysis.docx",
      "metadata_spo_item_path": "/...analysis.docx",
      "metadata_spo_item_content_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
      "metadata_spo_item_last_modified": "2025-03-20T15:19:49Z",
      "metadata_spo_item_size": 2527...,
      "content": "\nimage1.jpg\n\nimage10.jpg\n\nimage2.emf\n\n\n\n\n\n\n\n\n\nimage3.png\n\n",
      "ProjectNumber": null,
      "OwningDept": null
    }
Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,353 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Teresa Hoes 30 Reputation points
    2025-04-03T17:43:52.2433333+00:00

    An update for anyone following this thread. I ended up putting in a ticket with MS. They applied a hotfix to our search resource and the metadata started coming over into the index again.

    3 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.