If you want to get it to work with managed identity you can do a quick tweak (if you dont want to wait for EF 7 in november).
You can have a look at my gist what you need to do to create a custom extension and to get it to work.
https://gist.github.com/wkoeter/4ed90c7c8f61e3b3a52d2667d5a7c856
...
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddCosmosCustom<CosmosContext>(
endpoint: "https://westus22.documents.azure.com:443/",
databaseName: "MyDb",
managedIdentityClientId: "90df9398-990d-459f-8833-bfa4d762a4d7");
...
The github issue here
https://github.com/dotnet/efcore/issues/26491