microsoft / PowerApps-Samples

Sample code for Power Apps, including Dataverse, model-driven apps, canvas apps, Power Apps component framework, portals, and AI Builder.
https://docs.microsoft.com/powerapps
MIT License
1.48k stars 1.68k forks source link

WebAPIService usage for MS Dynamics CRM #328

Closed ilazarevski closed 1 year ago

ilazarevski commented 1 year ago

Hello,

is it possible to use the WebAPIService for on-premise MS Dynamics CRM?

Thank you in advanced.

Kind regards, Ilija.

JimDaly commented 1 year ago

@ilazarevski

The WebAPIService class library is a sample that demonstrates recommended practices, such as managing service protection limits, etc. It is a resource to learn from, not something we expect people to use in production 'as-is'.

I haven't done any testing with on-premises, but I expect it should work. You will need to change the version in the configuration because it currently defaults to v9.2, which is only online. On-premises would be v9.1.

If you are already using .NET, I would recommend using the SDK. If you want to use .NET Core, then I would recommend using Dataverse ServiceClient. See Transition apps to Dataverse ServiceClient. ServiceClient (and CrmServiceClient) manage service protection limits, has advanced capabilities for logging and is supported for use in your production environment.

I hope this helps. Let me know if you have any other questions.

ilazarevski commented 1 year ago

@JimDaly

Thank you for your answer and detailed information.

I take a look on the code, and some aspects (token generation, ...) should be adjusted to work with on-premises.

We will make additional analysis and decision for the next steps.

If we have any questions, we will inform you.