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

Announcements

No record found.

News and Announcements icon
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 132

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
    132 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 180 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 123

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans