justincase6507
justincase65072mo ago

Default role during account creation without v2 actions.

Hi everyone! Thanks for the great product. In our self-hosted setup, we had a flow in Actions v1 where, upon a public user registration, the user was automatically granted a default role (internal/external flow). However, after upgrading from v3 to v4, it seems that Actions v1 no longer triggers at all (we also switched to login v2 if that relatable) I’ve read posts here suggesting that we should move to Actions v2 since v1 will be deprecated soon. But from what I can tell, there doesn’t seem to be a way to assign a role to a user internally within Zitadel the way v1 allowed. Is there a way to implement this without having to call the API from an external backend? Thanks
2 Replies
Ask Inkeep
Ask Inkeep2mo ago
Hi @justincase6507, I'm an AI assistant for ZITADEL. While a team member reviews this question, I'll see if I can find relevant sources for your question. Answer I wasn't able to find a direct answer, here are some relevant sources: 1. Converting v1 Action to v2 Action: Add a default 'role' to newly created users : This GitHub issue describes the exact same challenge you're facing and shows a working v1 Action for adding default roles to new users (1) . 2. ZITADEL Actions v2 : Explains that Actions v2 will always be executed if available, even if the feature flag is switched off, and provides the overall architecture for migrating from v1 to v2 (2) . ​ To learn more, see the sources I considered: [1] Converting v1 Action to v2 Action: Add a default 'role' to newly created users [2] ZITADEL Actions v2 ​ Feel free to tag @Ask Inkeep with additional questions. Got it. Tagging @Rajat for additional help.
Rajat
Rajat2mo ago
hey @justincase6507 thanks for your question, I will check it and will get back to you hey @justincase6507 Actions V2 cannot add a role in-process like V1 did. There's an open issue for something similar there's a user who did a workaround that might work for now.

Did you find this page helpful?