8MAY 2010

Access denied by Business Data Connectivity – Solution


Posted by Tobias Zimmergren

Auhtor: Tobias Zimmergren
http://www.zimmergren.net | http://www.tozit.com | @zimmergren

Introduction

Lately I’ve been rolling around parts of Sweden and doing training, seminars and workshops on SharePoint 2010 with a bunch of companies and people.

One thing that I’ve been showing off, which I’m totally in love with by the way, is the BCS (Business Connectivity Services) functionality.

I’ve been getting a few questions from people who have been trying this out, but stumbled onto some problems with it in terms of permissions when they tried it out themselves.

Problem – Access Denied by Business Data Connectivity

When you’ve created your external list and try to access it (even as the same user, Administrator, that created it) you might get the following error:

image
Access denied by Business Data Connectivity

If you bump into this, please don’t freak out – just keep reading..

Solution – Permissions on the BCS Entity

To resolve this so called problem, follow along here:

Go to Central Administration -> Application Management -> Manage Service Applications -> Business Data Connectivity Service* -> [Your Entity] -> Set Permissions

* or whatever name you’ve chosen for your BCS Service application

image

Configure the actual permissions

In my case below, I’ve just told SharePoint that my Farm Administrator should be able to do all actions (Edit, Execute, Selectable in Clients and Set Permissions)

image

Please note: You might want to use different permissions in your environments – the permissions set in this blog post is just to demonstrate how you effectively change/add permissions for your BCS Entities to get up and running.

You will most likely be required to performa an IISRESET at this point to force SharePoint to understand what just happened :-)

Check your external list

You should now be able to access the external list and see the desired result.

image

Edit: As mentioned in the comments by David Parra, you can in some cases set “Metada ”Metadata Store Permissions” if the other attempts fail. Just remember to always do an IISRESET after you’ve set the permissions.

Keep rocking folks!

Cheers

  • http://collingszone.wordpress.com/ Adam Collings

    Thanks for the tip. I might have spent ages searching for the place to edit these permissions.

    • http://www.zimmergren.net/ Tobias Zimmergren

      I’m glad I could help, Adam.

  • Pingback: CodeFluent Entities: Using your application in SharePoint 2010 « The CodeFluent Entities Blog

  • Anonymous

    Tobias, thanks for the tip. I crossed the access denied page after setting up the permissions as you mentioned. However, after doing so, i get another error msg :

    “Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator.
    Correlation ID:355457d4-e452-4b98-ada6-2b7c674f07b8″

    I am trying to connect to an external system (CRM 2011 in this case) using BCS. Any help from your side would be greatly appreciated!

    • http://www.zimmergren.net/ Tobias Zimmergren

      Hi Mohdubaid,

      I’m glad you could progress a bit further in your problem – My best bet to start investigating your issues that are now occuring is to enable the ULS Logs (if they aren’t already) and then monitor the logs with ULSViewer to see the details of the error message.

      The message you posted is a generic SharePoint error message and doens’t give us any information – get the log tools and fetch the logs to see what they can tell us. See this post for further details on the logs: http://www.zimmergren.net/technical/sp-2010-developing-for-performance-part-4-logging

  • http://twitter.com/JoseDavidParra David Parra

    I tried all this without success.
    But it finally worked once I set the “Metadata Store Permissions” as well…
    2 days wasted because of this, and it is not mentioned anywhere else…
    Hope it could help somebody
    Cheers

    Jose

    • http://www.zimmergren.net/ Tobias Zimmergren

      Hi David,

      Glad to see you got it resolved. Good tip with the Metadata Store Permissions, may update my article to reflect your comment.

      Cheers,
      Tobias.

      • http://paulw.us paulwhit

        Please do. Seems like an critical part!

  • Pingback: SP 2010: Customizing the forms for External Lists (BCS) in SharePoint 2010 by using Custom Field Controls and jQuery | Tobias Zimmergren's thoughts on development

  • Veena

    This was very useful. Thanks

    • http://www.zimmergren.net/ Tobias Zimmergren

      Thanks Veena

  • Aleks

    great article Tobias! no need for IISRESET, patience is a key here ;) after few seconds (in my case less than a minute) it sorts itself out…

    • http://www.zimmergren.net/ Tobias Zimmergren

      Yep, it normally should work. Sometimes the easy way out is to just do the app pool recycle :)

  • DG86

    I tried setting both Object Permissions and Metadata store permissions and still can’t access to my external list…

    • http://www.zimmergren.net/ Tobias Zimmergren

      IISRESET after your changes?

  • Pingback: BCS – External Database and Add/Edit/Delete Operations « Jean Paul's Blog

  • Bergin

    I’m trying the Sharepoint Online and encountered this problem. Is there a solution? The Central Administration is not an option in SP Online. Please help.

  • Guillaume

    Works fine in IE , no luck with others browsers (Chrome, Firefox, …). I still have an error.
    Anyone got a clue?

    • http://www.zimmergren.net/ Tobias Zimmergren

      Just a random thought; Have you tried doing an IISRESET and clearing the cache in the browsers? (Shouldn’t be needed, but worth a shot)

      • Guillaume

        No luck with that, cleared everything, resetIIS and even restarted the server. Still only IE can get through

  • Pingback: Access denied by Business Data Connectivity | Share Point Online

  • Suresh

    Hai it is good and helpful for me but i am crawling the LOB i am getting the Error that is Error while crawling LOB contents. ( Access denied by Business Data Connectivity. )

    if we know any one how to rectify this error and get search results .Please share me any information available to get the LOB data results.

    Thanks,
    Suresh

  • Pingback: Jean Paul's Blog » Blog Archive » CRUD and BCS

  • Tantan Suryana

    Hi Tobias,

    Thanks for the article, its works, but when i create external content type list and then i create an application using this list, also i stopped inheritance permission too, so this list have the unique permission, the new user can’t access the application, the warning is “access denied by bussiness data conectivity”, so, how to grant permission to user non administrator? it is harmful to add user one by one in central administrator?

    Thank you

  • gowtham ks

    Thanks for the article, this helped me to resolve the BCS access denied issue. Saved a lot of time :)

    • http://www.zimmergren.net/ Tobias Zimmergren

      I’m glad it helped :-)
      Cheers,
      Tob.

  • http://sp2013.christianfamily.biz/ Daniel Christian

    Hi Tobias,

    Thanks for the article. Any ideas why I am getting ‘Unable to render the data. If the problem persists, contact your web server administrator.’?

    I looked through the correlation ID in the log files but didn’t see any High’s there or any access denied.

  • http://sp2013.christianfamily.biz/ Daniel Christian

    HI Tobias,
    Do we have a way to resolve this issue for Public Facing sites with anonymous access?
    We are working with a SharePoint 2013 farm.

  • Indresh

    Hi Tobias ,

    I am facing an error as “Access denied . you do not have permission to perform this action or access this resource ” …..
    It occurs when i create a new external list , please help to solve this….

    Cheers
    Indresh