Z
ZITADEL
Z
ZITADEL
Grants in complement token actions (v1)
Original message was deleted
ZITADEL
Join
ZITADEL - Identity infrastructure, simplified for you.
4,316
Members
View on Discord
R
Rajat Singh
β’
3/10/25, 8:04 AM
hi
@dsod interesting question and use case
let me think about it and will get back to you
D
dsod
Hey @Rajat , thanks! Not so much a use case as general question π but it does a...
R
Rajat Singh
β’
3/31/25, 4:25 PM
hey
@dsod this was missed by me for quite a while
, I will look into this tomorrow
D
dsod
I am implementing a flatRoles action that I will use on the complement token flo...
R
Rajat Singh
β’
4/1/25, 8:47 AM
hi
@dsod you can do both
https://github.com/zitadel/actions/blob/29ace7819f727cea424e86667d23da3fe7fda232/examples/custom_roles.js#L7
as you have to pass an array of grants with a mapping of
p
r
o
j
e
c
t
I
d
:role
so depending on what project Ids you pass
, it will set claims accordingly
.
try triggering the example above and see for yourself
GitHub
actions/examples/custom_roles.js at 29ace7819f727cea424e86667d23da3...
ZITADEL Actions
- Easy extensibility with custom code
. Think GitHub Actions in an Identity System
.
- zitadel
/actions
D
dsod
Yeah, this is similar code to what I ended up writing. But when testing, `ctx.v1...
R
Rajat Singh
β’
4/2/25, 12:49 PM
hi
@dsod yes it could be
, can you please try sending
urn:zitadel:iam:org:projectπ{projectid}:aud
urn:zitadel:iam:org:projectπ{projectid}:aud
scope if you dont have it yet
?
.
https://zitadel.com/docs/apis/openidoauth/scopes#:~:text=client%20belongs%20to.-,urn%3Azitadel%3Aiam%3Aorg%3Aprojects%3Aroles,-urn%3Azitadel%3Aiam
You can read about it here
ZITADEL Docs
ZITADEL supports the usage of scopes as way of requesting information from the IAM and also instruct ZITADEL to do certain operations
.
D
dsod
Yupp, that was it. Adding multiple project IDs as audience scope include roles f...
R
Rajat Singh
β’
4/3/25, 8:18 AM
Thanks
@dsod
, glad it worked out
, you can mark my answer with
to mark it as solved
G
Gigi the Giraffe (Zitadel)
β’
4/3/25, 9:21 AM
Looks like you just helped out another community member
! Thanks for being so helpful
@403882453653127168
! You
're now one step closer to leveling up
βkeep up the amazing peer support
!
urn:zitadel:iam:org:projectπ{projectid}:aud
urn:zitadel:iam:org:projectπ{projectid}:aud