Files
zitadel/apps/docs/content/guides/manage/customize/behavior.mdx
T
369b468720 chore: consistent naming for object ids (#11604)
<!--
Please inform yourself about the contribution guidelines on submitting a
PR here:
https://github.com/zitadel/zitadel/blob/main/CONTRIBUTING.md#submit-a-pull-request-pr.
Take note of how PR/commit titles should be written and replace the
template texts in the sections below. Don't remove any of the sections.
It is important that the commit history clearly shows what is changed
and why.
Important: By submitting a contribution you agree to the terms from our
Licensing Policy as described here:
https://github.com/zitadel/zitadel/blob/main/LICENSING.md#community-contributions.
-->

# Which Problems Are Solved
As part of the consistent naming effort, this PR focuses on Resource
ID's.

# How the Problems Are Solved
Renamed generic Resource ID to matching Object + ID such as

- Organization ID
- User ID
- Application ID
- Identity Provider ID
- Instance ID
- Project ID

# Additional Changes
None

# Additional Context
- Closes #11306

---------

Co-authored-by: Livio Spring <[email protected]>
2026-02-19 06:21:01 +00:00

51 lines
2.0 KiB
Plaintext

---
title: Behavior Customization
---
In this guide, you will create a [ZITADEL action](../../../concepts/features/actions).
After users register using an external identity provider, the action assigns them a role.
## Prerequisites
Before you start, make sure you have everything set up correctly.
- You need to be at least a ZITADEL _ORG_OWNER_
- Your ZITADEL organization needs to have the actions feature enabled. - [Your ZITADEL organization needs to have at least one external identity provider enabled](../../integrate/identity-providers/introduction)
- [You need to have at least one role configured for a project](../console/projects)
## Copy some information for the action
1. Select the **Projects** navigation item.
2. Select a project that has a role configured.
3. Copy the Project ID on the screens top right.
4. Scroll to the **ROLES** section and note some roles key.
## Create the action
1. Select the **Actions** navigation item.
2. In the **Actions <i className="las la-code"></i>** section, select the **+ New** button.
3. Give the new action the name `addGrant`.
4. Paste this snippet into the multiline text-field.
5. Replace the snippets placeholders and select **Save**.
```js reference
https://github.com/zitadel/actions/blob/main/examples/add_user_grant.js
```
## Run the action when a user registers
Now, make the action hook into the [external authentication flow](/apis/actions/external-authentication).
1. In the **Flows <i className="las la-exchange-alt"></i>** section, select the **+ New** button.
2. Select the **Flow Type** _External Authentication_.
3. Select the **Trigger Type** _Post Creation_.
4. In the **Actions** dropdown, check _addGrant_.
5. Select the **Save** button.
New users automatically are assigned a role now if they register by authenticating with an external identity provider.
## What's next?
- [Read more about the concepts around actions](/concepts/features/actions)
- [Read more about all the options you have with actions](/guides/manage/console/actions-overview)