Find recursive or circular group relations

Select circular relationships in the AD-groups directly from the database (migRaven 11)

Group-A is a member of group-B and group-B is again a member of group-A - which is rapidly becoming a problem. One wonders why the user's login is taking a long time. This can be a problem.

Whatever is not possible with the standard tools, can be easily found by using migRaven.

The first step is to identify the label for the database query. For this, one opens the browser with the following link:


Thereafter the value can be copied directly from the field "timestamp".


Then transfer the value from the field timestamp to the following database query:

MATCH (n: i635536686308747589 {type: "group"}) with collect (n) as n unwind n as group match p = groups - [: rel_member * ..] -> groups

RETURN length (p) as Quantity, as Groups, extract (x in nodes (p) | as Recursive_Groups;

(If the error message: Invalid input '"' ... .then the inverted commas in case of {type:" group "} are to be overwritten)

The query can be run directly in the database interface:



As a result of the query, one finds the size of the loop in the first column, the group in the second column that is in recursion and all groups in the third column that are in the loop:

Quantity Groups Recursive_Groups
2 8m_dl_firma01_rechte_modifyplus_mx 8m_dl_firma01_rechte_modifyplus_mx, 8m_dl_firma01_rechte_li, 8m_dl_firma01_rechte_modifyplus_mx
3 8m_dl_firma01_rechte_modifyplus_mx 8m_dl_firma01_rechte_modifyplus_mx, 8m_dl_firma01_rechte_li, 8m_dl_firma01_rechte_modifyplus_mx, 8m_dl_firma01_rechte_modifyplus_mx
1 8m_dl_firma01_rechte_modifyplus_mx 8m_dl_company01_right_modifyplus_mx, 8m_dl_company01_right_modifyplus_mx
3 8m_dl_firma01_rechte_modifyplus_mx 8m_dl_firma01_rechte_modifyplus_mx, 8m_dl_firma01_rechte_modifyplus_mx, 8m_dl_firma01_rechte_li, 8m_dl_firma01_rechte_modifyplus_mx
2 8m_dl_firma01_rechte_li 8m_dl_firma01_rechte_li, 8m_dl_firma01_rechte_modifyplus_mx, 8m_dl_firma01_rechte_li
3 8m_dl_firma01_rechte_li 8m_dl_firma01_rechte_li, 8m_dl_firma01_rechte_modifyplus_mx, 8m_dl_firma01_rechte_modifyplus_mx, 8m_dl_firma01_rechte_li

Permanent link to this post: