How to export API Keys of MetaDefender Core users

MetaDefender Core provides remote integration and management capabilities through its REST API interface. To perform API operations, each user must have a configured API key with the appropriate privileges for the intended actions.

However, when multiple users access MetaDefender Core simultaneously—each with their own API key—it can become challenging to maintain an accurate record of all existing keys.

To address this, the GET /admin/user API endpoint can be used to retrieve a complete list of users within MetaDefender Core, along with their associated details. This allows administrators to programmatically process the response and identify all users who possess an API key.

Furthermore, by leveraging the GET /admin/userdirectory API endpoint, it is possible to list all available user directories. This enables correlation between users and their respective directories, providing a clearer and more organized overview of user management within MetaDefender Core.

Below is a PowerShell script that retrieves and displays all existing users configured with an API key in MetaDefender Core. The output is presented in the following structured format:

USERAPI KEY
DIRECTORY\user<api key>

Notes:

  • Replace $apiKey and $coreUrl with your actual MetaDefender Core credentials and instance URL.
  • To export the results to a CSV file, uncomment the last line and provide a valid file path and name (for example: C:\Reports\MetaDefender_Users_APIKeys.csv).
Copy

If Further Assistance is required, please proceed to log a support case or chatting with our support engineer.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard