{
  "schemaVersion": "ebb.rule.v1",
  "id": "dotnet.package.microsoft-azure-documentdb.deprecated",
  "ecosystem": "dotnet",
  "purl": "pkg:nuget/Microsoft.Azure.DocumentDB",
  "affectedVersions": "vers:nuget/*",
  "event": "deprecated",
  "severity": "medium",
  "title": "Microsoft.Azure.DocumentDB is deprecated on NuGet",
  "summary": "NuGet marks all 36 listed versions of Microsoft.Azure.DocumentDB as deprecated (reason: Legacy). The publisher's message: \"Please note, this package is obsolete as of 3/31/2023 and is no longer maintained or monitored. Microsoft encourages you to upgrade to the replacement package, Microsoft.Azure.Cosmos, to continue receiving updates. Refer to our deprecation policy (https://aka.ms/azsdk/support-policies) for more details.\"",
  "replacement": "Microsoft.Azure.Cosmos",
  "deadline": "2023-03-31",
  "sources": [
    {
      "title": "Microsoft.Azure.DocumentDB on NuGet (deprecation metadata)",
      "url": "https://www.nuget.org/packages/Microsoft.Azure.DocumentDB",
      "accessedAt": "2026-10-19"
    },
    {
      "title": "NuGet package deprecation",
      "url": "https://learn.microsoft.com/nuget/nuget-org/deprecate-packages",
      "accessedAt": "2026-10-19"
    }
  ],
  "provenance": {
    "observedAt": "2026-10-19",
    "reviewedAt": "2026-10-19",
    "reviewer": "arminazimi"
  },
  "migration": {
    "constraints": [
      "Keep the account, database, and container names and the stored documents the same; only the client library changes.",
      "The Cosmos DB v3 SDK names collections \"containers\" and replaces DocumentClient with CosmosClient; check queries and partition key handling after the move."
    ],
    "steps": [
      {
        "id": "replace-documentdb",
        "title": "Move to Microsoft.Azure.Cosmos",
        "instructions": "Replace Microsoft.Azure.DocumentDB with Microsoft.Azure.Cosmos and update DocumentClient code to CosmosClient, Database, and Container.",
        "targets": "all"
      }
    ],
    "verification": [
      {
        "command": "dotnet build && dotnet test",
        "purpose": "Build and test after the client library change."
      }
    ]
  }
}
