Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Microsoft.XRM.SDK Version 9.0 gives error Exception: System.ServiceModel.Security.SecurityAccessDeniedException: Access is denied. with On Premise DCRM

(0) ShareShare
ReportReport
Posted on by 5

I want to use Microsoft.XRM.Sdk.Coreassemblies pack to communicate with Dynamics CRM on demand and on premise versions for a .net application. Till date I was using Version 8.0 assemblies and it is working fine.

But now I want to implement OAuth 2.0 for On-Demand instance of DCRM, after doing some R&D I got to know that it is possible with Microsoft.XRM.Sdk.Coreassemblies Version 9.0 with .net Framework 4.6.2 onward.

I am using basic authentication as of now with these new version of assemblies to keep my existing functionality working, but it is giving me an error 

Exception: System.ServiceModel.Security.SecurityAccessDeniedException: Access is denied.

Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Xrm.Sdk.IOrganizationService.Execute(OrganizationRequest request)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.ExecuteCore(OrganizationRequest request)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.Execute(OrganizationRequest request)
at com.magicsoftware.ibolt.dynamicscrm.onpremise.DynamicsCRM2013.GetVersion

Can someone help me out to resolve this issue ?

Or Can anyone tell how to implement OAuth 2.0 with some examle ?

  • Wahaj Rashid Profile Picture
    11,321 on at
    RE: Microsoft.XRM.SDK Version 9.0 gives error Exception: System.ServiceModel.Security.SecurityAccessDeniedException: Access is denied. with On Premise DCRM

    Hi,

    Thank you for your query.

    Can you please share the code snippet where you are connecting with CRM?

    Thank you,

    Wahaj

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,001 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,833 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans