Usually, when you use the key store to encrypt and decrypt data, you should save your registered AD application (with authorization to access the key store) ClientID and ClientSecret in plain text. This seems like a security issue if someone steals the ClientID and Secret, and anyone can claim to be a registered application.
Is there or can be a safer approach?
source
share