avondas
avondas3mo ago

Zitadel action on update user

hey all, I am working with zitadel 2.71.10 (self hosted) and I wanted to see if I could sync my Zitadel instance with my database. Say I update my user's name in Zitadel I would like to push this to my database. Is there an action trigger I am overlooking or would this be a custom build?
16 Replies
Rajat
Rajat3mo ago
hey @avondas you can create a target and set an execution and test it. https://zitadel.com/docs/guides/integrate/actions/testing-event#create-target in our case, its a user condition could be https://zitadel.com/docs/guides/integrate/actions/testing-request-manipulation#set-execution. You can read about different executions that you can perform here https://zitadel.com/docs/guides/integrate/actions/usage#condition-best-match
avondas
avondasOP3mo ago
Aha I guess I got confused by the actions tab in the Zitadel instance, thank you I will look into it 😁 Hi again, I was working on adding a target but it keeps telling me "Not Found", I double checked the various other beta APIs and get the same thing. I have the Settings/Features/Actions enabled, the Bearer token passed along is from a service user which has a Bearer access token type and this service user has IAM_OWNER permissions. Do actions need to be enabled elsewhere?
Rajat
Rajat3mo ago
hey @avondas what version are you on and can you please share some screenshot
avondas
avondasOP3mo ago
Hey @Rajat as I mentioned in the initial post I am currently on v2.71.10, a screenshot of the code implemented, as well as a screenshot of the error, which is a basic NotFound
No description
No description
Rajat
Rajat3mo ago
hi @avondas thanks for providing the screenshots, I will check it with my team and get back to you.
avondas
avondasOP3mo ago
Awesome thank you 😁
Rajat
Rajat3mo ago
hi @avondas thnaks for tour patience. I can confirm that the issue exist on this version. If you can, can you please try updating your version to v3.3.0 as it works on that version. so instead of image: 'ghcr.io/zitadel/zitadel:latest' you can do image: 'ghcr.io/zitadel/zitadel:v3.3.0' . And then when you try to create a target,it should work 🙂
Rajat
Rajat3mo ago
No description
avondas
avondasOP3mo ago
Thank you for investigating, I will see what happens next 😁
Rajat
Rajat3mo ago
yes please let me know
avondas
avondasOP3mo ago
Alright the upgrade to v3.3.0 worked to get the target working, however now I get the following error for creating the execution, the first part displayed is the string content. Even if I copy the example string content from the api documentation I get the same error.
No description
No description
Rajat
Rajat3mo ago
hey @avondas good afteroon, I will test in some time and will get back to you hin @avondas yes there's some issue with bidy parsing try this
{
"condition": {
"request": {
"method": "/zitadel.user.v2.UserService/UpdateHumanUser"
}
},
"targets": [
"<target-ID returned>"
]
}
{
"condition": {
"request": {
"method": "/zitadel.user.v2.UserService/UpdateHumanUser"
}
},
"targets": [
"<target-ID returned>"
]
}
Rajat
Rajat3mo ago
No description
No description
No description
avondas
avondasOP3mo ago
This does fix it indeed, thank you :D
Rajat Singh
Rajat Singh3mo ago
Glad it helped! You can mark My answer with ✅ and it'll Auto close the thread. Thanks
Gigi the Giraffe (Zitadel)
🎉 Looks like you just helped out another community member! Thanks for being so helpful <@1346540274674827395>! You're now one step closer to leveling up—keep up the amazing peer support! 🚀

Did you find this page helpful?