BCS: Login failed for user ‘NT AUTHORITY\IUSR’

Following my previous post, I just ran into another issue recently that I though I’ll write a post on so that it helps the community.

So I created an external content type to perform CRUD operations against a test table in a test database.  Saved that ECT (and so the model) to the BCS service application on my SharePoint 2013 server.  Assigned permissions to “All Users (Windows)” (NT Authority\Authenticated Users) with Execute permissions on metadata store (something that should not be done on live environments but secured store must be leveraged, but since this is a test environment… I took this liberty).  Created an external list and browsed to it.  And I was greeted with the below error.


Недопустимые учетные данные. Обратитесь к системному администратору.
Идентификатор взаимосвязи:4e3ac49c-ac79-2096-6db2-8b7ead579320
Сообщение из внешней системы: "Login failed for user 'NT AUTHORITY\IUSR'.".

I had setup this ECT to use “User’s Identity” (PassThrough) authentication and since metadata store permissions for “NT Authority\Authenticated Users” granted execute permissions I really wasn’t expecting this particular error.

After reviewing IISRESETs, reviewing ULS logs and bit of probing, I stumbled upon this KB article: SharePoint impersonates the IUSR account and is denied access to resources.  Perfectly matches my scenario!

I went ahead and set the value for aspnet:AllowAnonymousImpersonation to false in the web.config file of the web application where I had the external list as mentioned in the KB article and (I did not do an IISRESET after this change but it is recommended) that fixed the issue!


Hope this helps someone out there who’s trying out the same or similar thing and running into “Login failed for user ‘NT AUTHORITY\IUSR’.’.” error.  I’d recommend this web.config change for other scenarios too where a seemingly straight-forward service call would fail with a similar error.

Источник: http://blogs.msdn.com/b/sridhara/archive/2014/05/05/bcs-login-failed-for-user-nt-authority-iusr.aspx

Permanent link to this article: http://www.blogss.ru/bcs-login-failed-for-user-nt-authorityiusr

Добавить комментарий

Your email address will not be published.