---
title: Changing default access and secret key in MongoDB
description: You can change default access and the secret key in MongoDB.
component: pingintelligence
version: 5.2
page_id: pingintelligence:installing_pingintelligence_for_apis:pingintelligence_changing_default_access_secret_key_mongodb
canonical_url: https://docs.pingidentity.com/pingintelligence/5.2/installing_pingintelligence_for_apis/pingintelligence_changing_default_access_secret_key_mongodb.html
revdate: April 3, 2024
section_ids:
  about-this-task: About this task
  steps: Steps
---

# Changing default access and secret key in MongoDB

You can change default access and the secret key in MongoDB.

## About this task

To change the default access and secret key, complete the following steps.

|   |                                                                                        |
| - | -------------------------------------------------------------------------------------- |
|   | ":" (colon) is a restricted character and not allowed in the access key or secret key. |

## Steps

1. Connect to MongoDB by entering the following command:

   ```
   mongo --host <mongo-host> --port <mongo-port> --authenticationDatabase admin -u absuser -p abs123
   ```

   |   |                                                                           |
   | - | ------------------------------------------------------------------------- |
   |   | `absuser` and `abs123` are the default username and password for MongoDB. |

2. On the MongoDB prompt, run the following command:

   ```
   use abs_metadata
   db.auth_info.updateOne( { access_key: "<new-access-key>", secret_key: "<new-secret-key>"} )
   ```
