client.secrets().createSecret() creates a secret in a folder in an environment of a project. The machine identity needs a role in the project that can change secrets, such as Member.
If the folder has an approval policy, Infisical opens a change request instead of creating the secret, and returns the change request in approval.