Keychain.AddGenericPassword
---------------------------

Adds a generic password to the keychain.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Keychain](component_Keychain.md) | [16.3](newinversion163.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |

MBS( "Keychain.AddGenericPassword"; Service; Account; Password { ; Description } ) 

**MBS**( **"Keychain.AddGenericPassword";** /\* Adds a generic password to the keychain. \*/  
**$Service**; /\* The service name.e.g. "test" \*/   
**$Account**; /\* The account name.e.g. "john" \*/   
**$Password**; /\* The password to use.e.g. "secret" \*/   
**$Description**) /\* Optional; The description to include in the keychain entry.e.g. "just a test" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Service | The service name. | "test" |  |
| Account | The account name. | "john" |  |
| Password | The password to use. | "secret" |  |
| Description | The description to include in the keychain entry. | "just a test" | Optional |

### Result

Returns OK or error.

### Description

Adds a generic password to the keychain.  
Goes into the default keychain and the FileMaker app automatically gets permissions to read it later.  
### Examples

Add a password:

 MBS ( "Keychain.AddGenericPassword"; "test"; "john"; "secret"; "just a test" )  
### See also

- [Keychain.DeleteGenericPassword](KeychainDeleteGenericPassword.md)
- [Keychain.FindGenericPassword](KeychainFindGenericPassword.md)
- [Keychain.ListGenericPasswords](KeychainListGenericPasswords.md)
- [Keychain.UpdateGenericPassword](KeychainUpdateGenericPassword.md)

### Release notes

- **Version 16.3**
    - Added Keychain.AddGenericPassword, Keychain.DeleteGenericPassword, Keychain.FindGenericPassword, Keychain.ListGenericPasswords and Keychain.UpdateGenericPassword functions.

### Blog Entries

- [Secure Password Storage with Keychain Functions in MBS FileMaker Plugin 16.3](https://www.mbsplugins.de/archive/2026-06-23/Secure_Password_Storage_with_K/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 16.3pr1](https://www.mbsplugins.de/archive/2026-06-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 8th May 2026 , last changed 8th May 2026

  
[JavaScript.SetPropertyJSON](JavaScriptSetPropertyJSON.md) - [Keychain.AddPassword](KeychainAddPassword.md)

[HTML Version](KeychainAddGenericPassword.shtml)