Architecture:
I have my data as files in SharePoint, I want to use Azure AI search to query the data but also apply security filters for document level restriction.
I created a new application which has access to that SharePoint.
I get User ID get’s passed to the python code from front end, where I can get the list of groups user has access to. So I can use this Group ID’s to restrict the access he has to on search with security filters.
As indexer doesn’t pull these permissions into the index (Link) I need to add new field GroupsID. This field need to be populated with File groups for each files that are indexed. How can I add them to the Index, so I can restrict user access to files one has.
I Tried crawling through the file SharePoint to generate a dict of file_id’s and it’s associated GroupsID’s. But my key is "metadata_spo_site_library_item_id", and it’s not matching with the site ID, library ID, and item ID combination when I’m generating manually. Even so is it possible to update with this dict ?
2
Answers
I have figured out the solution. You can use "@search.action": "mergeOrUpload" with your key field to update the indexed indexer
Reference here
What you are attempting to do is, as of this writing, not supported with Azure AI Search out of the box. From Index data from SharePoint document libraries§Limitations and considerations (emphasis mine):