web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Dynamics 365 connectivity problem from Azure function v2

(0) ShareShare
ReportReport
Posted on by 130

Hi 

I am trying to connect Dynamics 365 CE from Azure function V2. I have checked different blogs and articles on it. But unfortunately, I am unable to manage the connection.

Initially, I have got XRM to assembly not found issue. Fixed the issue following this article

https://debajmecrm.com/2019/06/21/solvedwhy-are-my-crm-sdk-assembly-references-in-azure-functions-throwing-error-how-do-i-refer-my-custom-assemblies-which-are-not-in-nuget/

But still having issue with 

2020-01-02T09:48:50.297 [Error] run.csx(31,45): error CS0012: The type 'ClientCredentials' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
2020-01-02T09:48:50.356 [Error] run.csx(32,45): error CS0012: The type 'ClientCredentials' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
2020-01-02T09:48:50.411 [Error] run.csx(35,78): error CS0012: The type 'ClientCredentials' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

Please find the code as the reference 

azurev2_2D00_d365.png

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    You will not be able to use v2 because there is no .Net Core version of SDK assemblies.

    You will have to use v1 instead or use WebApi to connect to Dynamics instance - docs.microsoft.com/.../quick-start-console-app-csharp

  • Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    Agree with Andrew, You won't be able to use V2, Also I will suggest you to develop your Azure function app in Visual Studio, there you can control the version and test there once everything working file you can publish.

    From the portal you need to do hack to change version of the App.

  • Suggested answer
    ashish12 Profile Picture
    3,079 on at
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    In case you want to refer: http://himbap.com/blog/?p=3689

  • D365 Warrior Profile Picture
    130 on at

    Hi Andrew

    Thanks for your reply. yes I fixed this using v1.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 81 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans