Javascript Error - Access Denied issue RRS feed

  • Question

  • Hi,

    I am invoking "setstate" method using XRMServiceToolKit from a crm form ribbon. For some users it is working fine. In some machines for admin account it is showing "Access Denied" issue. In some other machines it is not working for any user.

    Is there any way to find the issue root cause? Even in IE debugging also I am unable to find the issue.

    Is it IE settings issue?

    How to identify it?

    Thanks in advance.

    Monday, April 11, 2016 3:42 AM

All replies

  • One possibility is if users use different urls to access CRM. The XRMServiceToolkit may use the url as defined in CRM Deployment Manager (for the organization web service). If clients access CRM with a different url, then you would get an Access Denied, as the request would be seen as for a different DNS domain

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, April 11, 2016 12:51 PM
  • Hi Samuel,

    This usually points to the URL being passed through the script being different from what is configured in the deployment manager. We are assuming this is an on-prem deployment.

    You may want to check the Service URL from Settings --> Customization --> Developer Resources matches the url you see the toolkit is sending the request.

    Make sure you have the FQDN specified in the Deployment Manager settings.

    Another way which is not really recommended would be change IE settings to enable cross-domain access. Add your CRM URL to trusted sites and then enable the "Access Data Sources across Domain" setting under Miscellaneous. If this resolves the issue, then you need to recheck the URL settings in Deployment manager.



    Dynamics CRM MVP | Inogic | http://inogic.com/blog/ | news at inogic dot com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Wednesday, April 13, 2016 8:44 AM
  • Thanks for the reply...

    During debugging I observed that, for service account the URL is returned for "Xrm.Page.context.getClientUrl "  as "http(s)://server/org"

    for other users it is returned as "http(s)://server" (" organization is missing").

    Is it due to settings issue? Any thoughts

    Thursday, April 14, 2016 5:01 AM
  • Hi

    Do other users (non-admin) have security privilege - Read Service Endpoint under Customizations Tab in security roles?

    Thursday, April 14, 2016 9:24 AM
  • Non-admin roles have "read" privilege on the service endpoint.

    Friday, April 15, 2016 8:16 AM