none
BCS and external content type RRS feed

  • Question

  • I set up secure store with a target application for BCS, set its credentials. I was also able to successfully connect to database source from SharePoint Designer and create an external content type. I went ahead and created an external list based on the ECT. However, when I try to browse the external list, I get "Login failed for user "XXX".

    I verified and the above account "XXX" has db_datareader role on the database and this is the same account I used for the target application in secure store.

    What might be missing? Any pointers?

    Thanks!


    • Edited by diffident Thursday, June 16, 2016 3:27 PM
    Thursday, June 16, 2016 3:26 PM

All replies

  • There are a bunch of permissions-related things to check here. It can be confusing and from your description I'm not sure whether you're running into a problem with the Secure Store accessing the database or your account "XXX" getting access to the BCS Service Application external content type.

    The Secure Store piece is to allow you to save the credentials which will access your database -- the account which has db_datareader role on the database, for example. Once you have configured that, though, you need to allow users to access that BCS content type.

    Here's a link to a couple of resources which may help fill in some missing pieces:

    https://msdn.microsoft.com/en-us/library/office/ee557243(v=office.14).aspx

    http://sharepoint.stackexchange.com/questions/14667/cant-create-external-content-type-linked-to-sql-server

    Let us know if that gets you further or to a different error message.

    Thursday, June 16, 2016 4:31 PM
  • Thanks, Aaron. Instead of troubleshooting the existing content type, I created a new content type and connected it to a database table which had only few hundred rows. Next, I provisioned an external list based on the content type. I tried accessing external list and that worked perfectly.

    So, apparently, permissions are set up correctly. Is that right? I wonder why I got "Login failed for user XXX" yesterday?

    Also the content type for which I get this login failed error is connected to a database table that has ~30,000 rows and sometimes takes ~3 minutes to return the rows. Could that be a reason why I am getting login failed?


    • Edited by diffident Thursday, June 16, 2016 10:42 PM
    Thursday, June 16, 2016 10:30 PM
  • Hi diffident,

    please check below links which explains the for getting login failed for user error.

    http://www.c-sharpcorner.com/UploadFile/specialhost/how-to-fix-login-failed-for-user-nt-authority-iusrs-in-share/


    Friday, June 17, 2016 1:16 AM
  • Hi,

    Any update?

    Please try to use a SQL table with little data to test if it works.

    Best Regards,

    Dennis


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, June 30, 2016 8:47 AM
    Moderator