I had an issue with an SMB File Share in an Azure Storage Account stuck in an in-between state. The file share gets regularly deleted and created anew, and has a seven-day soft delete policy, meaning it has multiple deleted versions saved. At some point, possibly as a result of some Azure Service Health event, the latest version of the file share was both not present among the active file shares, but also not marked as deleted.

Any operation on the file share returned a 404, including trying to delete it. Doing a CreateIfNotExists on the file share also failed. Hence, I was stuck.

Solution: Pick the next-to-last version from the deleted versions list, undelete it, then delete it again. The (new) last version is then correctly marked as “deleted” and CreateIfNotExists succeeds.