An Azure NoSQL database service for app development.
Hello @Weezelboy
Since your ODBC provider reports cosmos-netstandard-sdk/3.18.0, it is possible that the driver embeds an older Azure Cosmos DB .NET SDK that does not understand newer container metadata introduced with features such as:
- Large Partition Keys (PartitionKeyDefinitionVersion = V2)
- Hierarchical Partition Keys (MultiHash)
- Other newer container capabilities
If the linked server relies on that embedded SDK, authentication may succeed, but container discovery or metadata retrieval can fail with the HTTP 400 error you're seeing.
To help confirm the root cause, I would recommend verifying the following:
- Whether the affected container uses PartitionKeyDefinitionVersion = V2.
- Whether it uses Hierarchical Partition Keys (MultiHash).
- Whether the problem occurs only with newer containers while older containers created with traditional V1 partition keys continue to work.
If those conditions are true, this would strongly indicate an SDK compatibility limitation rather than a SQL Server or authentication issue.
- At that point, the available options are generally:
- Upgrade to an ODBC/OLE DB provider that bundles a newer Cosmos DB SDK (if available).
- Use another supported integration method (such as Azure Synapse Link, Microsoft Fabric, Azure Data Factory, or a custom application using the latest Cosmos DB SDK).
Recreate the container with a V1 partition key only if legacy Linked Server compatibility is an absolute requirement.
Hopefully, someone from the Azure Cosmos DB product team can confirm whether the SQL Server Linked Server/ODBC path currently supports containers created with Large Partition Keys or Hierarchical Partition Keys, and whether there is an official compatibility matrix or roadmap for these newer features. That information would be valuable for anyone integrating Cosmos DB through legacy ODBC/OLE DB providers.
Please "Accept the Answer" if this information helped you. This will help us and others in the community as well.