Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories IAM
Created by Guest
Created on Aug 8, 2024

Improve Admin API for API keys rotation

Given we have security mandates where we need to rotate API keys for an organization, every 365 days. It would be ideal if when calling https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Programmatic-API-Keys/operation/getApiKey getApiKey from admin api that it should return the created date. This way programmatically we can rotate keys and maintain security posture. As well if there was a way to just refresh the api secret and not generate a new one that would be a plus

  • Admin
    Alexander Johansson
    Nov 4, 2025

    thanks for this request - sorry for the delayed response!

    We released a new identity "Atlas Service Accounts" that provides creation details for the identity and secret and allows you to rotate the secret independently. Terraform authentication support was added last month and we are working to add creation support in TF this quarter

    Check our service accounts here
    https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/group/endpoint-service-accounts

  • Kyle Mertz Admin
    Feb 4, 2025
    I agree. I'm not sure why the API key created and lastUsed dates aren't included on the response to the call for all API keys in the org. Those pieces of information are critical to be able to properly audit and track usage of the API keys we have with MongoDB.