---
updatedAt: 2026-05-21T22:42:24.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/powershell/llms.txt
---

# Edgegrid credentials

Get-EdgegridCredentials

## Synopsis

Retrieve EdgeGrid credentials.

## Syntax

```powershell
Get-EdgegridCredentials [[-EdgeRCFile] <String>] [[-Section] <String>] [[-AccountSwitchKey] <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
```

## Description

This function will load EdgeGrid credentials by checking for environment variables `AKAMAI_HOST`, `AKAMAI_CLIENT_TOKEN`, etc.) or your `.edgerc` file. These can then be used to sign requests, or be saved to a file with `Export-EdgeGridCredentials`. If you specify an `.edgerc` file, that will be tried directly. If not, we check environment variables first, then the default `edgerc` file location `~/.edgerc`), finally throwing an error if no credentials can be found.

If you specify a `-Section` parameter, we will check for environment variables with that value as a prefix, e.g. `-Section MyCreds` will instruct the function to look for `AKAMAI_MYCREDS_HOST` and so on.

## Parameters

<table>
  <tbody>
    <tr>
      <td class="ps-td"><code>&#8209;AccountSwitchKey</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>An account credential key that lets you move between accounts when using an API client enabled for multiple accounts. To find account switch keys, use <a href="https://techdocs.akamai.com/powershell/docs/get-accountswitchkey">Get-AccountSwitchKey</a>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;EdgeRCFile</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>Your EdgeGrid resource file to authenticate your command. Defaults to <code>~/.edgerc</code>.</p>
        </div>
      </td>
    </tr>
    <tr>
      <td class="ps-td"><code>&#8209;Section</code></td> 
      <td class="ps-tableinner">
        <div class="ps-metadata">
          <span class="ps-param-metadata">String</span>
          <span class="ps-param-metadata">Pipeline input: False</span>
        </div>
        <div>
          <p>The section name in your EdgeGrid resource file to retrieve authentication credentials from. Defaults to <code>default</code>.</p>
        </div>
      </td>
    </tr>
  </tbody>
</table>

## Related Links

[User Guide: Overview](https://techdocs.akamai.com/powershell/docs/overview)

# Sibling pages

* [Akamai options](https://techdocs.akamai.com/powershell/docs/get-akamaioptions.md)
* [Auth grants](https://techdocs.akamai.com/powershell/docs/get-authgrants.md)
* [Netstorage Credentials](https://techdocs.akamai.com/powershell/docs/get-netstoragecredentials.md)