---
title: Roles and relationship change notification
description: Configure PingIDM role change notification to propagate relationship changes through assignments to all role members using notify and notifyRelationships
component: pingidm
version: 7.5
page_id: pingidm:objects-guide:roles-change-notification
canonical_url: https://docs.pingidentity.com/pingidm/8.1/objects-guide/roles-change-notification.html
llms_txt: https://docs.pingidentity.com/pingidm/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
keywords: ["Data Object Model", "Roles", "Relationships", "Change Notification"]
superseded_by: https://docs.pingidentity.com/pingidm/8.1/objects-guide/roles-change-notification.html
---

# Roles and relationship change notification

Before you read this section, refer to [Configure relationship change notification](relationships-notification.html) to understand the `notify` and `notifyRelationships` properties, and how change notification works for relationships in general. In the case of roles, the change notification configuration exists to ensure that managed users are notified when any of the relationships that link users, roles, and assignments are manipulated (that is, created, updated, or deleted).

|   |                                                                                                                                                                                                                                                                                                                                                                   |
| - | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | Because role change notification propagates to every member of the role, roles with extremely large membership are subject to the same performance and scaling considerations as any other large-scale relationship notification. Learn more in [Performance and scaling considerations](relationships-notification.html#relationships-notification-performance). |

Consider the situation where a user has role `R`. A new assignment `A` is created that references role `R`. Ultimately, we want to notify all users that have role `R` so that their reconciliation state will reflect any attributes in the new assignment `A`. We achieve this notification with the following configuration:

In the managed object schema, the `assignment` object definition has a `roles` property that includes a `resourceCollection`. The `path` of this resource collection is `managed/role` and `"notify" : true` for the resource collection:

```json
{
    "name" : "assignment",
    "schema" : {
        ...
        "properties" : {
            ...
            "roles" : {
                ...
                "items" : {
                    ...
                    "resourceCollection" : [
                        {
                            "notify" : true,
                            "path" : "managed/role",
                            "label" : "Role",
                            "query" : {
                                "queryFilter" : "true",
                                "fields" : [
                                    "name"
                                ]
                            }
                        }
                    ...
}
```

With this configuration, when assignment `A` is created, with a reference to role `R`, role `R` is notified of the change. However, we still need to propagate that notification to any `users` who are `members` of role `R`. To do this, we configure the `role` object as follows:

```json
{
    "name" : "role",
    "schema" : {
        ...
        "properties" : {
            ...
            "assignments" : {
                ...
                "notifyRelationships" : ["members"]
            }
    ...
}
```

When role `R` is notified of the creation of a new relationship to assignment `A`, the notification is propagated through the `assignments` property. Because `"notifyRelationships" : ["members"]` is set on the `assignments` property, the notification is propagated across role `R` to all members of role `R`.
