This API supports the use of a “name” field in the request body.
However this field actually sets the “role” field and “Secret Key” is set as the name.
Additionally in the UI it’s possible to edit the service account and update the name. However this Modify API is not currently supported in documentation.
I maintain the unofficial terraform provider for OpenAI and someone has raised an issue on this. Is it possible to get this reviewed and resolved?
I’ve done some additional investigation on this. It looks like project members /users are linked closely with service account api keys. This is partially the reason for the strange behaviour. It would be much cleaner to manage users and api keys separately. Is anybody else seeing this issue?
I’m not quite having this problem (setting name does seem to correct set name of the service account).
However the API returns an undocumented api_key object - which is needed because you need the API key for the service account. But the name of this api_key is null which renders as Secret Key in the UI. It would be good to be able to set this.