MongoDB.GetCredentials
----------------------

Queries credentials as JSON.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [MongoDB](component_MongoDB.md) | [14.2](newinversion142.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "MongoDB.GetCredentials"; MongoDBRef ) 

**MBS**( **"MongoDB.GetCredentials";** /\* Queries credentials as JSON. \*/  
**$MongoDBRef**) /\* The reference number for the mongo connection.e.g. $MongoDB \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| MongoDBRef | The reference number for the mongo connection. | $MongoDB |

### Result

Returns JSON or error.

### Description

Queries credentials as JSON.  
### Examples

Query credentials:

 Show Custom Dialog \[ "Credentials" ; MBS ("MongoDB.GetCredentials"; $Mongo ) \]  
<small>  
Example result:   
{ "authmechanism" : "MONGODB-X509" , "authsource" : "$external" } </small>### Release notes

- **Version 14.2**
    - Added [MongoDB.GetAppName](https://www.mbsplugins.eu/MongoDBGetAppName.shtml), [MongoDB.SetAppName](https://www.mbsplugins.eu/MongoDBSetAppName.shtml) and [MongoDB.GetCredentials](https://www.mbsplugins.eu/MongoDBGetCredentials.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 14.2pr1](https://www.mbsplugins.de/archive/2024-04-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 20th March 2024 , last changed 23th June 2024

  
[MongoDB.GetCompressors](MongoDBGetCompressors.md) - [MongoDB.GetOptions](MongoDBGetOptions.md)

[HTML Version](MongoDBGetCredentials.shtml)