Saturday, February 26, 2011
Solution to Access denied By Business Data Connectivity
Once all the setup is completed like creating External Content types and by using it we have created external list we may see this error. You may feel surprise that you may have used administrator account to create external content type and logged into the site as site collection administrator and still you are seeing the error message. Right?
Here, we have to remember one thing that the access denied error is coming because the data source we are trying to connect is external one not belongs to SharePoint. :) So it don't care what is your role or permission in SharePoint. The external data source only cares about whether to perform a specific action user has access to do that or not. So, the user who is doing these operations [select, insert, delete, update] should have access to external data source.
- Open Central Administration site
- Go to Manage service applications –> Select Business Connectivity Application
- On this page you see all your external content types you added. [Don't forget to select the External Content Type option from top dropdown]
- Hover the external content type and from the context menu select Set Permissions
- It will open a dialog and there we have to give specific permission to the user. In my case I logged in as me and added that account and given all access.
- Click OK.
- Now, go back to your site and refresh the page. You start seeing all the data is pulled from Sql Server to the SharePoint 2010 external list.