{"id":11003,"date":"2025-11-20T08:00:35","date_gmt":"2025-11-20T16:00:35","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/cosmosdb\/?p=11003"},"modified":"2025-11-14T09:44:23","modified_gmt":"2025-11-14T17:44:23","slug":"announcing-private-preview-safe-account-key-rotation-using-account-key-usage-metadata","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cosmosdb\/announcing-private-preview-safe-account-key-rotation-using-account-key-usage-metadata\/","title":{"rendered":"Announcing Private Preview: Safe Account Key rotation using Account Key Usage Metadata"},"content":{"rendered":"<p><span data-contrast=\"auto\">Account Key Usage Metadata is a new security and observability feature that helps Azure Cosmos DB customers avoid service disruptions during key rotations. <\/span><span data-contrast=\"auto\">It provides visibility <\/span><b><span data-contrast=\"auto\">when each account key was last used<\/span><\/b><span data-contrast=\"auto\">, allowing teams to make informed decisions before rotating or <\/span><b><span data-contrast=\"auto\">migrating to Entra ID.<\/span><\/b><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">This feature addresses a common challenge of rotating a key that appears unused but is still actively relied upon by critical applications\u2014leading to unexpected outages.<\/span><\/p>\n<h2><span class=\"TextRun SCXW224894089 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW224894089 BCX8\" data-ccp-parastyle=\"heading 2\">How Does It Work?<\/span><\/span><span class=\"EOP SCXW224894089 BCX8\" data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<p><span class=\"TextRun SCXW114623400 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW114623400 BCX8\">In the <\/span><\/span><span class=\"TextRun SCXW114623400 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW114623400 BCX8\">private preview<\/span><\/span><span class=\"TextRun SCXW114623400 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW114623400 BCX8\">,<\/span><span class=\"NormalTextRun SCXW114623400 BCX8\"> o<\/span><span class=\"NormalTextRun CommentStart SCXW114623400 BCX8\">n your Azure Cosmos DB account, y<\/span><span class=\"NormalTextRun SCXW114623400 BCX8\">ou<\/span><span class=\"NormalTextRun SCXW114623400 BCX8\"> can view the <\/span><\/span><strong><span class=\"TextRun SCXW114623400 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW114623400 BCX8\">last usage timestamp<\/span><\/span><\/strong><span class=\"TextRun SCXW114623400 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW114623400 BCX8\"> for each key. This timestamp reflects the most recent operation that used the key.<\/span><\/span><span class=\"EOP SCXW114623400 BCX8\" data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2025\/10\/safeKeyRotationscreen.png\"><img decoding=\"async\" class=\"alignnone wp-image-11005 size-full\" src=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2025\/10\/safeKeyRotationscreen.png\" alt=\"Image of safe Key Rotation screen \" width=\"780\" height=\"444\" srcset=\"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2025\/10\/safeKeyRotationscreen.png 780w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2025\/10\/safeKeyRotationscreen-300x171.png 300w, https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-content\/uploads\/sites\/52\/2025\/10\/safeKeyRotationscreen-768x437.png 768w\" sizes=\"(max-width: 780px) 100vw, 780px\" \/><\/a><\/p>\n<p><span class=\"TextRun SCXW261607711 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW261607711 BCX8\">To <\/span><span class=\"NormalTextRun SCXW261607711 BCX8\">identify<\/span><span class=\"NormalTextRun SCXW261607711 BCX8\"> w<\/span><span class=\"NormalTextRun CommentStart SCXW261607711 BCX8\">hich applications are using the key<\/span><span class=\"NormalTextRun SCXW261607711 BCX8\">, <\/span><span class=\"NormalTextRun SCXW261607711 BCX8\">you<\/span><span class=\"NormalTextRun SCXW261607711 BCX8\"> can <\/span><\/span><span class=\"TextRun SCXW261607711 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW261607711 BCX8\">enable diagnostic <\/span><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW261607711 BCX8\">logging, which <\/span><\/span><span class=\"TextRun SCXW261607711 BCX8\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW261607711 BCX8\">provides detailed telemetry including user agents and operation types.<\/span><\/span><span class=\"EOP SCXW261607711 BCX8\" data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"2\"><span data-contrast=\"none\">Why Is It Important?<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Prevents outages or disruption to your applications<\/span><\/b><span data-contrast=\"auto\">: Avoids accidental rotation of actively used keys.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Improve security hygiene<\/span><\/b><span data-contrast=\"auto\">: Encourages safe and intentional key rotation.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">This is especially valuable for:<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\"><strong>Disable local authentication<\/strong>: Provides confidence that keys are no longer in use before migrating to Entra ID.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Infrequently used keys<\/span><\/b><span data-contrast=\"auto\">: Monthly or yearly jobs that still depend on keys.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Shared keys across teams<\/span><\/b><span data-contrast=\"auto\">: Where visibility is often limited.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<h2 aria-level=\"2\"><span data-contrast=\"none\">How to Onboard and Use It<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<p><iframe src=\"\/\/www.youtube.com\/embed\/YpCNS0iKr9A\" width=\"560\" height=\"314\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Private preview access<\/span><\/b><span data-contrast=\"auto\">: Customers interested in early access using <\/span><a href=\"https:\/\/aka.ms\/SafeKeyRotationSignUp\"><span data-contrast=\"none\">sign up form<\/span><\/a><span data-contrast=\"auto\"> or reach out to us on <a href=\"mailto:cosmosdb-sec-feature@microsoft.com\">cosmosdb-sec-feature@microsoft.com<\/a><\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Usage visibility<\/span><\/b><span data-contrast=\"auto\">: Once enabled, usage data begins collecting from the activation date forward.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><b><span data-contrast=\"auto\">Diagnostic logging<\/span><\/b><span data-contrast=\"auto\">: Optional logging can be enabled to help identify which user agents are using the key.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/li>\n<\/ul>\n<h2 aria-level=\"2\"><span data-contrast=\"none\">What\u2019s Next?<\/span><span data-ccp-props=\"{&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;335559738&quot;:160,&quot;335559739&quot;:80}\">\u00a0<\/span><\/h2>\n<p>We\u2019re working on enhancements that make key management smarter. Soon, you\u2019ll be able to <strong>check whether a key is actively in use before you regenerate it or disable local authentication<\/strong>. This added insight helps you avoid disruptions and ensures a smooth, secure transition.<\/p>\n<p><span data-contrast=\"auto\">For more details on how to get started on <a href=\"https:\/\/aka.ms\/AccountKeyUsage\">Azure Cosmos account key usage metadata<\/a>.<\/span><\/p>\n<h2><b><span data-contrast=\"auto\">\u2b50<\/span><\/b><b><span data-contrast=\"none\">Leave a review<\/span><\/b><span data-contrast=\"none\">\u202f<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Tell us about your Azure Cosmos DB experience! Leave a review on\u202fPeerSpot\u202fand\u202fwe\u2019ll\u202fgift\u202fyou $50.\u202f<\/span><a href=\"https:\/\/peerspotdotcom.my.site.com\/proReviews\/?SalesOpportunityProduct=00kPy000004TKXJIA4&amp;productPeerspotNumber=30881&amp;CalendlyAccount=peerspot&amp;CalendlyFormLink=peerspot-product-reviews-ps-gc-vi-sf-50&amp;giftCard=50\"><span data-contrast=\"none\">Get started here<\/span><\/a><span data-contrast=\"auto\">.\u202f<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h2><b><span data-contrast=\"auto\">\u2601\ufe0f<\/span><\/b><b><span data-contrast=\"none\">About Azure Cosmos DB<\/span><\/b><span data-contrast=\"none\">\u202f<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Azure Cosmos DB is a fully managed and serverless NoSQL and vector database for modern app development, including AI applications. With its SLA-backed speed and availability as well as instant dynamic scalability, it is ideal for real-time NoSQL and MongoDB applications that require high performance and distributed computing over massive volumes of NoSQL and vector data.\u202f<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">\u202fTo stay in the loop on Azure Cosmos DB updates, follow us on\u202f<\/span><a href=\"https:\/\/twitter.com\/AzureCosmosDB\"><span data-contrast=\"none\">X<\/span><\/a><span data-contrast=\"auto\">,\u202f<\/span><a href=\"https:\/\/aka.ms\/AzureCosmosDBYouTube\"><span data-contrast=\"none\">YouTube<\/span><\/a><span data-contrast=\"auto\">, and\u202f<\/span><a href=\"https:\/\/www.linkedin.com\/company\/azure-cosmos-db\/\"><span data-contrast=\"none\">LinkedIn<\/span><\/a><span data-contrast=\"auto\">.\u202f<\/span><span data-ccp-props=\"{&quot;134233117&quot;:false,&quot;134233118&quot;:false,&quot;201341983&quot;:0,&quot;335559738&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Account Key Usage Metadata is a new security and observability feature that helps Azure Cosmos DB customers avoid service disruptions during key rotations. It provides visibility when each account key was last used, allowing teams to make informed decisions before rotating or migrating to Entra ID.\u00a0 This feature addresses a common challenge of rotating a [&hellip;]<\/p>\n","protected":false},"author":72078,"featured_media":11325,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,667],"tags":[499,1963,1962,668],"class_list":["post-11003","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-core-sql-api","category-security","tag-azure-cosmos-db","tag-entra-id","tag-key-rotation","tag-security"],"acf":[],"blog_post_summary":"<p>Account Key Usage Metadata is a new security and observability feature that helps Azure Cosmos DB customers avoid service disruptions during key rotations. It provides visibility when each account key was last used, allowing teams to make informed decisions before rotating or migrating to Entra ID.\u00a0 This feature addresses a common challenge of rotating a [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/11003","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/users\/72078"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/comments?post=11003"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/posts\/11003\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media\/11325"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/media?parent=11003"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/categories?post=11003"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cosmosdb\/wp-json\/wp\/v2\/tags?post=11003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}