---
title: "Usercube-New-OpenIDSecret"
description: "Use Usercube-New-OpenIDSecret.exe to generate a random client secret and its hash for an OpenIdClient, and to rotate an existing secret in Identity Manager."
sidebar_position: 270
---

# Usercube-New-OpenIDSecret

This tool generates a cryptographically secure random client secret and its hash. The name of the executable is: Usercube-New-OpenIDSecret.exe.

## Examples

```shell
./Usercube-New-OpenIDSecret.exe
Shared secret for '<generated secret>' is '<hash>'
```


The output shows the client secret and its hashed version. The secret is displayed only once and can't be provided by the user. Enter the hash in the [OpenIdClient](../../toolkit/xml-configuration/access-control/openidclient.md) configuration.

## Secret rotation

Rotating existing secrets regularly is recommended. To rotate the secret of an OpenIdClient, generate a new secret with this tool, replace the `HashedSecret` in the [OpenIdClient](../../toolkit/xml-configuration/access-control/openidclient.md) configuration, and update the secret on the client side.

## Arguments

 | Argument Name | Details |
 | --- | --- |
 | --log-level   optional | __Type__    LogLevel   __Description__ Level of log information among: ```Verbose```; ```Debug```; ```Information```; ```Warning```; ```Error```; ```Fatal```. |
