Message from External System : 'Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

24/03/2015 12:55

This error occured when trying to create sharepoint external list with External content type fetching data from SQL database.

Issue was connected with authentication mode of BCS (Business connectivity service) and one of solutions was to revert authentication to self using following script and then to change authentication in External content type.


Add-Pssnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue

$bcsApp = Get-SPServiceApplication ' Where-Object {$_.TypeName -match "Business Data Connectivity"}
$bcsApp

if($bcsApp.Count -eq 1)
{
    $bcsApp.RevertToSelfAllowed = $true
    $bcsApp.Update()
}
else
{
    "There are more Business Data Connectivity applications on the farm, select the proper one in a script."
}

setup
BDC identity in External Content type (SP designer, edit connection), make sure
BCS app pool has access to db