Lync user delegates where are stored in database RRS feed

  • Question

  • Hi !

    I would like to query database and find all delegates for Lync users, in which databases that is stored ? I would like to create SQL report for summary all users that have delegates for their account.


    Thursday, September 26, 2013 11:34 AM

All replies

  • Hi,

    Check this SEFAutil

    SEFAUtil (secondary extension feature activation) enables Lync Server 2010 administrators and helpdesk agents to configure delegate-ringing and call-forwarding settings on behalf of a Lync Server user. This tool also allows administrators to query the call-routing settings that are published for a particular user.

    Thursday, September 26, 2013 11:49 AM
  • Hi !

    Thanks for that tool , it's helpful when I want to check one user, but if I have few hundreds users I would like to query globally settings and create matrix with users and delegates, could I use that tool for global reporting for all users and their delegates ?



    Thursday, September 26, 2013 12:25 PM
  • Hi,

    Here is the link - The Word document describing the Microsoft Lync Server 2010 Resource Kit Tools has a good description (Page 64) on how to run SEFAutil.

    You can script it for all users to get full details. 

    Thursday, September 26, 2013 1:54 PM
  • ok, I try to use that and it works, but I would like to receive all list of delegates also that delegates that are not checked by checkbox in delegates windows, for example I have 3 delegates and only for 2 of 3 delegates checkbox (Receive Calls) is marked, so I am going to find in database where that all 3 users for that specific users are stored also delegates that don't have marked that checkbox, it's possible by SQL ? probably yes, but I don't know how Lync it stored :(


    • Edited by user012az Thursday, September 26, 2013 3:02 PM mistake
    Thursday, September 26, 2013 3:02 PM
  • I found there is a table Delegate in the RTC database. And you can find the same column from all tables. These tables must be related.

    Check the following link about “Query to Find Column from All Tables of Database”.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Friday, September 27, 2013 8:34 AM
  • Thanks for all ideas, but nothig found :(

    I have 5 databases on my sql sever : rtcab , rtcxds , rtcshared , xds , lis

    I tried to do backup all 5 db and do some changes in delegates and backup again. I restored all 5 databases in both versions but comparsion of that 2 version of all 5 db not help me :(

    Any other ideas ?



    Tuesday, October 1, 2013 8:54 AM
  • @ Kamil

    did you finally get the location for delegates?

    I have the same problem like you described above, figure out all existing entrys...

    Additional I would prefer writeing new delegations directly into Database instead of using SEFAutil.

    Thanks for reply


    Thursday, July 3, 2014 3:25 PM
  • Hi,

    Old post I know, but myself and a colleague spent some time yesterday writing a PowerShell script to capture this information.  Please see below

    Save as .ps1 and run FILENAME.PS1 ALL (for all users)



    $users = Get-CsUser | select sipaddress

    $runnumber = switch ($run)


            1 {"0..100"}

            2 {"101..200"}

            3 {"201..300"}

            4 {"301..400"}

            5 {"401..500"}

            6 {"501..600"}

                    7 {"37..37"}

                    ALL {"0..1000"}

                    default {"0..2"}


    $myusers = invoke-expression -command "`$users[$runnumber]"


    foreach ($user in $myusers)



    $thisresult = @()

    $urt = ""

    $callfw = ""


    $thisresult = "" | select Username, UserRingTime, CallForward,DelayRingDelegates,GroupPickupOrbit,ForwardImmediate

                    $user = $user.SipAddress.tostring().split(":")[1]

                    $cmd={ & 'c:\program files\microsoft lync server 2013\reskit\SEFAUtil.exe' $user /}

                    $result=invoke-command $cmd


                    write-output "----------"

                    $username = $result[0].split(" ")[2]

                    $matchstring = $result[4].split(":")[0]

           write-host "! $matchstring !"

                    if ( $matchstring -match "User Ring")


               $urt = $result[4].split(" ")[3].trim()

                       $callFW = $result[5].split(":")[2]



              { Write-host " outer else  "


                if ($matchstring -match "Delegate" )

                     { Write-host " match delegate"

                                    $thisresult.DelayRingDelegates = $result[4].split("(")[1]

                                    $thisresult.GroupPickupOrbit   = $result[5].split(":")[2]




                                    if ( $result[4] -match  "Forward immediate")


                                    $urt ="Forward Immediate"

                                    $callfw = $result[4].split(":")[2]





                                    Write-host " match inner else "

                            $urt = " Not Found"

                            $callFW = $result[4].split(":")[1].trim()




    $thisresult.username = $username

    $thisresult.UserRingTime = $urt

    $thisresult.CallForward = $callfw

    #write-host "username =  , urt = $urt,  callfw = $callfw"

    $Finalresult +=$thisresult


    $finalresult | sort-object -property username | export-csv result.csv -append -notypeInformation

    #$finalresult | sort-object -property username | where {$_.callforward -eq "False"}


    Hope this helps someone! :-)


    Tuesday, September 23, 2014 9:29 AM
  • Can you help me to figure out what parameters we need change in this script>? and where to define output file path to save ?

    Kulbir Singh

    Friday, March 23, 2018 10:15 PM