Skip to main content

Notifications

Announcements

No record found.

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
    Wahaj Rashid 11,319 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans