09 May, 2014

No UserProfileApplicationProxy exists in the current context

Today one of our business owners has reported their workflows are failing. It’s quite strange as I am taking care of the infrastructure and no changes has made recently i.e. no language packs, no patch upgrade, no third party software installation so I wasn’t sure what exactly happened and their workflows have started failing.

Before checking anything, I have restarted the SharePoint Timer Service to make sure everything is working properly as workflows jobs are dependent on it but that didn’t result into any success. So finally I started looking into ULS logs by hoping will get something very concrete which will guide me in right direction towards resolution and I was damn right!

Here are the findings:
Template Discovery/InitScriptData: cannot get user profile, no UserProfileApplicationProxy exists in the current context     297b8263-3256-4f3b-bb62-a1ceb2d4600f
05/09/2014 15:29:31.57        w3wp.exe (0x1F34)                           0x2630       Web Content Management        Publishing                       7fz3   Medium       Setting [Display] as the FormContext.FormMode for the current page         297b8263-3256-4f3b-bb62-a1ceb2d4600f
05/09/2014 15:29:31.57        w3wp.exe (0x1F34)                           0x2630       Web Content Management        Publishing                       7fz3   Medium       Setting [Display] as the FormContext.FormMode for the current page         297b8263-3256-4f3b-bb62-a1ceb2d4600f
05/09/2014 15:29:31.62        w3wp.exe (0x1F34)                           0x2960       SharePoint Foundation            Monitoring                      b4ly   High            Leaving Monitored Scope (EnsureListItemsData). Execution Time=27.7202828851153   59cb65df-da26-4357-8f32-84a2cac755c5
05/09/2014 15:29:31.73        w3wp.exe (0x1F34)                           0x2630       SharePoint Foundation            Monitoring                      b4ly   High            Leaving Monitored Scope (DataBinding DataFormWebPart (CMS_RT)). Execution Time=138.975204949232          297b8263-3256-4f3b-bb62-a1ceb2d4600f
05/09/2014 15:29:31.81        OWSTIMER.EXE (0x3628)                            0x2D1C          SharePoint Foundation             Monitoring                      nasq  Medium       Entering monitored scope (Timer Job SchedulingUnpublish) 3a1381ea-de0d-4616-9c25-d06d19a650bf
05/09/2014 15:29:31.81        w3wp.exe (0x1F34)                           0x2960       SharePoint Foundation            Web Controls                            cm8z  Medium       Failed to get SPGroupName from GroupID. Error Message: Group cannot be found.  Callstack:    at Microsoft.SharePoint.SPGroupCollection.GetByID(Int32 id)     at Microsoft.SharePoint.WebControls.PeopleEditor.set_SharePointGroupID(Int32 value).          59cb65df-da26-4357-8f32-84a2cac755c5
05/09/2014 15:29:31.82        w3wp.exe (0x1F34)                           0x2960       at Microsoft.SharePoint.WebControls.PeopleEditor.set_SharePointGroupID(Int32 value).          59cb65df-da26-4357-8f32-84a2cac755c5
05/09/2014 15:29:31.82        w3wp.exe (0x1F34)  0x2960   

From these findings, I know where to check and what should be change! And I would like to share the same details with all of you because after making that change, your issue will be resolved.

Note: before I mentioned the exact details, make sure that you have the “user profile web service application” exist in your environment.

Resolution:
1.   Open the Central Administration
2.   Application management
3.   Service Applications
4.   Configure Service Application Associations
5.   Check the web application in which your site exist
6.   Check the “Application Proxy Group” column
7.   Click on the custom group / default group
8.   Tick the User profile service application check box
9.   Click OK

That’s it – You are done!

Note:
If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

Product Applies To:
a)   SharePoint Server 2010
b)   SharePoint Server 2013

7 comments:

  1. Just Fabulous buddy!!! I have followed your written steps and wow - works like a charm :) Thanks for your valuable contribution...

    ReplyDelete
  2. Bang on target! Your Step by Step Resolution helps me to resolved my issue. Thanks Amol!

    ReplyDelete
  3. +1, Yes, works for me also :)

    ReplyDelete
  4. wow! dear, your resolution works like a magic..
    highly appreciated dear

    ReplyDelete
  5. Have you created the User Profile Application Proxy? i think that is the problem, if you created your User Profile application service using powershell, you need to create the proxy, you can use the following powershell command

    New-SPProfileServiceApplicationProxy -Name “User Profile Proxy”
    –DefaultProxyGroup
    -ServiceApplication $ups

    where $ups is your user profile application service.

    -Victor Castro
    Senior SharePoint Developer at TATA Consultancy Services

    ReplyDelete
  6. Thank You. This fixed our issue as well (Sharepoint 2013) - Adam B

    ReplyDelete
  7. Thanks brother, this saved me...message me on bisht11984@gmail.com

    ReplyDelete

Your feedback is always appreciated. I will try to reply to your queries as soon as possible- Amol Ghuge

Note: Only a member of this blog may post a comment.