Service account key does not get correct permission if an object class is created later than the key was generated

I have a service that needs to be run from an unathenticated app. I use the web request action node, with a key. The key was generated before one of the object classes in the service was created. This gave the error message “Failed to persist object”. I created a new key after the object class was created and then it worked fine. Both had the same permission and security settings.

Hi!

Thank you for letting us know!

It’s important to note that a service always runs under a role, and that role must be granted the appropriate permissions whenever new object classes are created. Do you know if this might be the case?

Could you also confirm whether this happened in the Dev environment or in another one? If it’s another environment, one possible explanation is that a “full deploy” was not performed. Without a full deploy, the role associated with the API key may not have received the necessary permissions for the new object class, since permission changes require a full deploy to take effect.

Yes, the role had sufficient permissions. There were 2 object classes in the service with the exact same permission settings. One created before the key and the other after the key.

It happened in production.

Important info is that the old key started to work again when I created a new key. As if it, when generated a new key, refreshed the permissions for the old key for everything that was created after the key itself.

A bit unsure of what could have happened, but everything’s OK now?