Cosmos DB Resource with specified id or name already exists

Solution:- Use DocumentClient.UpsertDocumentAsync instead of DocumentClient.CreateDocumentAsync

More information DocumentClient.CreateDocumentAsync Method   DocumentClient.UpsertDocumentAsync Method

Add Comment