A user-defined role that combines a specific set of permissions (Actions, NotActions, DataActions) when the built-in Azure roles do not fit the required least-privilege principle.
AZ-305 asks when to create a custom role instead of using Contributor/Reader: when you need to grant exactly a subset of permissions (e.g., only restart VMs, without being able to delete them). It's defined in JSON and assigned just like a built-in role.
Custom RBAC role is a concept that can show up on the exam. Check the full guide to see it in context.