Aviya Baumgarten
11/25/2025, 3:09 PMactorId equal to the management key ID, and no userId is included. Is there a way to attach a custom field to the access key-such as the creator’s user ID or email - so that this information is populated as the userId in the AccessKeyCreated audit event?Nick Rodriguez
11/25/2025, 3:22 PMAviya Baumgarten
11/25/2025, 3:24 PMNick Rodriguez
11/25/2025, 3:32 PMAviya Baumgarten
11/25/2025, 3:36 PMAviya Baumgarten
11/26/2025, 8:12 AMuserId during creation, but it seems that no matter what I do, the access key is still being created under the management key identity rather than my own user identity. The resulting access key and its exchanged JWT always reflect the management key ID instead of the user who created it.
This is the example for creating the access key:
curl -X POST "https://api.descope.com/v1/mgmt/accesskey/create" \
-H "Authorization: Bearer projectID:ManagementKey" \
-H "Content-Type: application/json" \
-d '{
"name": "test1",
"keyTenants": [
{
"tenantId": "tenant1",
"roleNames": [
"role1",
"role2"
]
}
],
"userId": "U2yb5hag6x5uzp38eeDlhGFUUnyz",
"customClaims": {
"email": "aviya@valkyrie.io"
},
"permittedIps": []
}'
the access key that created, is bound to the created_by : K35k8ROmlxlHkwoqjjNBoK5nSx9d id, which is not my userId.
After that, on the audit page I get no value for the Access Key Created event*.*Aviya Baumgarten
11/26/2025, 8:14 AMAtharva Joshi
11/26/2025, 8:37 AMAviya Baumgarten
11/26/2025, 8:40 AMAviad Lichtenstadt
11/26/2025, 8:48 AMcreatedBy will always be the mgmt key id that created this key
The Bound UserName will be the correct user that this key is bound toAviya Baumgarten
11/26/2025, 8:49 AMAviad Lichtenstadt
11/26/2025, 9:00 AMAviya Baumgarten
11/26/2025, 9:17 AM