This is an upgraded from 2011RU17>2013SP1>2015Update0_1 on premise.
When selecting the symbol next to a user to view the hierarchy we get the generic "Error has occurred" message.
The event log has the following:
Exception message: The maximum recursion has reached before statement completion.
I had our DBA trace the process and she maxed the allowable recursions and it still fails on this SQL:
exec
sp_executesql N'WITH systemuser_hierarchical([Level], SystemUserId, ParentSystemUserId) AS
(
SELECT 0, "systemuser".SystemUserId, "systemuser".ParentSystemUserId
FROM SystemUser "systemuser" WHERE "systemuser".SystemUserId=@SystemUserId0
UNION ALL
SELECT [Level]-1, "systemuser".SystemUserId, "systemuser".ParentSystemUserId
FROM SystemUser "systemuser","systemuser_hierarchical" "systemuser_hierarchical" WHERE "systemuser".SystemUserId="systemuser_hierarchical".ParentSystemUserId)
select
( select count(1) from SystemUser where ParentSystemUserId = "systemuser0".SystemUserId ) as "HierarchyDataService_CountChildren"
, "systemuser0".IsDisabled as "isdisabled"
, "systemuser0".Title as "title"
, "systemuser0".BusinessUnitId as "businessunitid"
, "systemuser0".InternalEMailAddress as "internalemailaddress"
, "systemuser0".MobilePhone as "mobilephone"
, "systemuser0".FullName as "fullname"
, "systemuser0".SystemUserId as "systemuserid"
, "systemuser0".EntityImage_URL as "entityimage_url"
, "systemuser0".BusinessUnitIdName as "businessunitidname"
from
SystemUser as "systemuser0"
inner join "systemuser_hierarchical" as "systemuser_hierarchical" on ("systemuser_hierarchical".SystemUserId = "systemuser0".SystemUserId and "systemuser_hierarchical".[Level]
!= 0) order by
"systemuser_hierarchical".[Level] desc
OPTION (MAXRECURSION 100)',N'@SystemUserId0 uniqueidentifier',@SystemUserId0='D8A8D787-0BB7-DD11-BAC4-0050569B14AC'