1

I am trying to use the REST service to access a document library and when I use the expand=File/ModifiedBy option, and the results contain a deleted user it fails. I believe this was working fine prior to the last SP Update but can't be certain.

_api/web/lists/getbytitle('MyLibrary')/items?$expand=File/CheckedOutByUser,File/ModifiedBy&$filter=SomeValue eq 226

Anyone else experience this?

1

My guess is somebody messed with the user info list on the site and deleted those entries from the list.

Never delete users from SharePoint's user list. Even though the account owners may be gone, the user info is still important for data integrity. Delete or deactivate the underlying AD accounts instead.

If this is what happened your options are: restore from a backup, initiate a support ticket to see if MS can fix it, or go through your data and try to remove all the references to the deleted users.

  • Sorry, the terminology is misleading. A deleted user means the record is marked as deleted. The account still exists in the Users table. The issue is the integrity is still there and SP should return the reference without issue and does with the older Listdata.svc Rest interface. It doesn't work with the newer REST. – Beruken Jul 1 at 12:38
  • You're going to need to incrementally simplify your query until you isolate the exact record/field that's throwing the error. Once you do that the issue will probably become elf-evident. Also, it might be helpful to specify your version and patch level, especially if you think it's related to an update. – Derek Gusoff Jul 1 at 14:53
  • Thanks. I believe I did isolate to the specific output request expand=File/ModifiedBy. Good point about the update but now that I think of it , it's likely I only became aware as we marked some user accounts as deleted recently. We were not managing those very much. The original question still stands. Do others get the same behavior? Could you test the query with a know deleted account and last modified record? – Beruken Jul 1 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.