Love to code, although it bugs me.

Sharepoint 2010 BCS Login failed for user "NT AUTHORITY\ANONYMOUS LOGON"

1 comment
Given the task to create an external list on a Sharepoint 2010 site, the general steps to follow are the following:
  • Create the external Content Type
  • Create the content type CRUD operations
  • Define the identifier field
  • Define a list length threshold
  • Create the associated list and forms
  • Set the meta data store permissions and object permissions according to planned
A step by step example can be found on this post. However, having things done, I faced the following error when trying to view the list on the site:

Login failed for user "NT AUTHORITY\ANONYMOUS LOGON"

This resulted from the fact that apparently the Business Data Connectivity Service wasn't passing the current user's  credentials to access the external data, although  the “Connect with User’s Identity” had been selected on the external content type creation.
Not being able to solve this issue, I tried to configure the data source to use the credential running the BCS service which had full access to the data. When trying to save the object on Sharepoint Designer, I got the following error:



To make the desired change, you should run the following commands on the Sharepoint Administration Powershell prompt:

PS C:\Users\SPSadmin> Get-SPServiceApplication

DisplayName          TypeName             Id
-----------          --------             --
...
User Profile Serv... User Profile Serv... 2303b602-0d87-46b8-a684-e6a884dd1071
...

PS C:\Users\SPSadmin> $bdc = Get-SPServiceApplication -id 2303b602-0d87-46b8-a684-e6a884dd1071
PS C:\Users\SPSadmin> $bdc.RevertToSelfAllowed = $true
PS C:\Users\SPSadmin> $bdc.Update()

Afterwards, restart the Business Data Connectivity Service and the list should be working fine.
For this and other Sharepoint 2010 issues I strongly recommend reading Professional SharePoint 2010 Administration.

1 comment :



  1. It is useful to learn how to set and reset a error.Thank you author for posting this kind of error.

    http://www.wikitechy.com/fix-error/login-failed-for-user


    Both are really good.
    Cheers,
    Venkat

    ReplyDelete