After connecting to an environment with Strategy Workstation 2021, any action, such as creating new attributes, will display the following error:
Error when restoring the idToken: Required property 'identityTokenSecretKey' for identity token generation is not configured

In many cases this issue occurs because the "modelservice.identity_token.secret_key" in the modelservice.conf file is not configured correctly, as described in the following article:
KB484255: Configure the Modeling Service
In this particular instance, despite the modelservice.conf file was correctly configured, the issue would persist because the identity token secret key in cache is cleared when the modeling service is idle for more than 24 hours. The secret key is saved in the system default preference cache and persisted in the temp file folder, it would be cleared automatically by the system scheduler.
The error may happen randomly if there are multiple modeling services in the environment and some of them are not working. When the request is talking to modeling service, consul will pick a modeling service randomly, and randomly meets the error.
Restart the modeling service so that the identity token secret key is loaded properly.