# Extension authentications (IRPCExtensionAuthentications)

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/

Manages the credentials that the vault uses to access external systems, such as external
repositories connected to the vault, on behalf of the user.

- **gRPC service:** `MFiles.IRPCExtensionAuthentications`
- **Book and level:** [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md), standard
- **Methods:** 8
- **Proto file:** [`mfiles/IRPCExtensionAuthentications.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/IRPCExtensionAuthentications.proto)

<a id="overview"></a>

## Overview

Some vault applications and external repository connections need the user's own credentials
for the external system. The server keeps those credentials per user and target. M-Files
clients use this service in their "external repositories" dialogs.

1. [GetExtensionAuthenticationTargets](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/GetExtensionAuthenticationTargets/index.md)
   lists the external systems (targets) and the authentication methods they accept.
2. [GetExtensionAuthenticationStatus](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/GetExtensionAuthenticationStatus/index.md)
   tells for which targets the caller has stored credentials.
3. [StoreExtensionAuthenticationCredentials](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/StoreExtensionAuthenticationCredentials/index.md)
   logs the caller in to a target by storing credentials.
4. [LogoutWithExtensionAuthentication](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/LogoutWithExtensionAuthentication/index.md)
   removes them.

All methods need a vault session; anonymous sessions cannot store credentials. A target is
identified by `ExtensionAuthenticationTarget.id`. Methods that name an unknown target generally
succeed without doing anything, so check the result with
[GetExtensionAuthenticationStatus](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/GetExtensionAuthenticationStatus/index.md).

Credentials for the whole vault (common, background and permission-reading accounts) are set
by vault administrators with
[StoreExtensionAuthenticationSpecialCredentials](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/StoreExtensionAuthenticationSpecialCredentials/index.md).
Send credentials only over TLS.

<a id="methods"></a>

## Methods

| Method | Summary | Facts |
|---|---|---|
| [GetExtensionAuthenticationStatus](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/GetExtensionAuthenticationStatus/index.md) | Lists the targets for which the caller has stored credentials, with the account name used. | `read` `session` `idempotent` `returns metadata structure version` |
| [GetExtensionAuthenticationTargets](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/GetExtensionAuthenticationTargets/index.md) | Lists the external systems that accept credentials through this service. | `read` `session` `idempotent` `returns metadata structure version` |
| [LogInAsDifferentUserForExtensionAuthentication](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/LogInAsDifferentUserForExtensionAuthentication/index.md) | Asks the external system to start a new login for the caller, so that the caller can switch to another account there. Used by M-Files clients; applications rarely call it. | `write` `session` `returns metadata structure version` |
| [LoginWithExtensionAuthentication](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/LoginWithExtensionAuthentication/index.md) | Logs the caller in to an external system with encrypted credentials. | `write` `session` `returns metadata structure version` |
| [LogoutWithExtensionAuthentication](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/LogoutWithExtensionAuthentication/index.md) | Removes the caller's stored credentials for an external system and logs the caller out of it. | `write` `session` `returns metadata structure version` |
| [RemoveExtensionAuthenticationSpecialCredentials](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/RemoveExtensionAuthenticationSpecialCredentials/index.md) | Removes vault-wide credentials for an external system. Used by vault administration tools. | `write` `session` `returns metadata structure version` |
| [StoreExtensionAuthenticationCredentials](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/StoreExtensionAuthenticationCredentials/index.md) | Logs the caller in to an external system by storing the caller's credentials for it. | `write` `session` `returns metadata structure version` |
| [StoreExtensionAuthenticationSpecialCredentials](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCExtensionAuthentications/StoreExtensionAuthenticationSpecialCredentials/index.md) | Stores vault-wide credentials for an external system: the common, background or permission-reading account. Used by vault administration tools. | `write` `session` `returns metadata structure version` |
