An Azure NoSQL database service for app development.
Hi, Alex,
Cosmos DB tracks when account keys were last used separately from the diagnostic logs it sends to Log Analytics. Safe Key Rotation uses that tracking to check whether a key is still in use. Turning it on does not start tracking or explain why the portal field is blank.
To verify key activity, make a successful read using a known account key and note the time in UTC. For Direct mode, check CDBDataPlaneRequests in Log Analytics. The KeyType column can identify the primary or secondary key used. For Gateway mode, AuthTokenType shows the gateway’s authorization type and may not identify the specific account key. If the portal still shows no timestamp after confirmed key use, send Azure Support the account resource ID, request activity ID, and timestamp so they can investigate. A blank field alone is not evidence that the key is unused.
Thank you, and feel free to reply if you need more help.