🔑 Admin Key Creation & Data Logging Configuration Guide in OpenAI for Authentication
This guide walks OpenAI account administrators through generating a new Admin API key and enabling data logging in the Data Controls section for audit, compliance, and operational purposes.✅ Prerequisites
Ensure you meet these prerequisites before starting:- Admin access to AirMDR application
- You must have access to the OpenAI Developer Platform with Admin privileges in your OpenAI organization
- Permissions to manage API keys and system-wide data settings
Generate a New Admin API Key
To generate an Admin key in the OpenAI Platform for integrating with AirMDR, follow these steps:1
Login to the OpenAI Platform
- Navigate to Open AI Platform.
- Click Login in the top-right corner, and authenticate with your admin credentials.
2
Create a New Admin Key
- In the Left Navigation pane, enter the value “Admin API Keys” in the Search bar.
- Go to Admin Keys management page.
-
Click on the “+ Create new Admin key” button. A pop-up modal will show up.

-
In the Create new admin key pop-up modal
- Provide a descriptive name for the API key (e.g.,
AirMDR Integration). - In the Permissions, select the Read only option.

- Provide a descriptive name for the API key (e.g.,
- Click Create admin key to generate the key.
3
Copy and Store the API Key
- A modal will display your new secret API key.
- Click Copy to save it to your clipboard.
-
Once you successfully copy and securely saved the Key, click Done.

Email the Admin API key to AirMDR
or
Self configure OpenAI in the AirMDR Integrations Dashboard.
Enable Data Logging in Data Controls
1
Access Data Controls
- Go to Organization → Data Controls → Data retention.
- Locate the Audit Logging toggle.
- Set it to Enabled (ON).
-
Click Save.

- Review the logging policy and retention notice.
- Confirm your changes if prompted.
2
Verify Logging Behavior
- Perform a test API call using the new Admin key.
- Confirm activity is recorded under Usage or via your audit log provider (if integrated).
Post-Setup Security Best Practices (Optional)
- Rotate keys periodically and delete unused ones.
- Regularly review your organization’s data control settings for compliance.
- Monitor usage under: https://platform.openai.com/account/usage
- Never share your API key publicly.
- Use environment variables or secret vaults (like AWS Secrets Manager, Azure Key Vault).
- Rotate keys regularly and revoke unused keys from the API Key page.
Skills Provided by this Integration
| Skill ID | Purpose |
|---|---|
| Get OpenAI Audit Logs | Retrieve audit logs from the OpenAI platform with filtering capabilities for time ranges, actors, and event types. |
OpenAI API Testing
Open cURL and run the following command to check if your API Key is working: SamplecURLCommand
Replace ADMIN_API_KEY with your actual secret API key.
Sample JSON Response
Configure OpenAI in the AirMDR Integrations Dashboard
-
Navigate to AirMDR, provide the credentials, and click Login

-
Navigate to the AirMDR Integrations Dashboard in the left navigation pane and select Integrations.

-
Use the search option, enter the keyword “OpenAI”, select the Connections tab, and click Create.

-
Enter an unique name to the Instance (e.g.,
your org name-OpenAI) to easily identify the user connection by AirMDR. -
Enter the generated API Token (Admin API Key) in the Authentication Details field params, and click Create.


