<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [ibm-cloud-sdk-core](./ibm-cloud-sdk-core.md) &gt; [getAuthenticatorFromEnvironment](./ibm-cloud-sdk-core.getauthenticatorfromenvironment.md)

## getAuthenticatorFromEnvironment() function

Look for external configuration of authenticator.

Try to get authenticator from external sources, with the following priority: 1. Credentials file (ibm-credentials.env) 2. Environment variables 3. VCAP Services (Cloud Foundry)

**Signature:**

```typescript
export declare function getAuthenticatorFromEnvironment(serviceName: string): Authenticator;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

serviceName


</td><td>

string


</td><td>

the service name prefix.


</td></tr>
</tbody></table>
**Returns:**

[Authenticator](./ibm-cloud-sdk-core.authenticator.md)

