This is LINQPad driver which enables you to connect to your Microsoft Dynamics CRM Web API and run LINQ queries.
Please see HowTo.md
This driver supports Dynamics 365/CRM 2016 On-Premise, IFD and Online. Each has slightly different usage.
If you are using On-Premise without Claim authentication, you can simply use Windows Authentication. So no additional work is required.
If you are using IFD, then you need to manually register application first.
- Log in to AD FS server (require Windows Server 2012 R2 AD FS)
- Open PowerShell. 3, Run the following command to register application. You can change GUID as you need but you need to use "http://localhost/linqpad" as RedirectUri.
Add-AdfsClient -ClientId 5ee98d47-38d1-4db5-b5c2-9a60f88c0076 -Name "CRM For LINQPad" -RedirectUri http://localhost/linqpad
- Now you can add connection to LINQPad. Pass the ClientId before Login to CRM, and make use to select IFD for authentication.
- You will be prompted when driver download metadata, and when you do query in new window.
For Online, the driver will automatically register your application. However, if you do not have admin privilege, you can register the application in different Azure AD and get Client Id. In that case, use following information to register.
- Register as Native Application.
- Give Dynamics CRM Online permission.
- Use "http://localhost/linqpad" as RedirectUri
If you don't have enough privilege to register application to the Azure AD, you can register application in your own Azure AD and use the client id and redirect url for consent scenario.
The privilege the application needs are:
- Dynamics CRM Online : Access CRM Online as organization users
- Windows Azure Active Directory : Sign in and read user profile
Make sure to mark the application availableToOtherTenants to true.
- Download application manifest from "Manage Manifest" menu.
- Open downloaded manifest with any editor.
- Mark "true" for availableToOtherTenants.
- Import the manifest back to the application.
Please let us know what's working, what isn't, as well as suggestions for new capabilities by submitting a new issue
In addition to providing feedback on this project site, we'd love to hear directly from you!
Please use Issues in this GitHub.
This solution uses Context generated from Web API endpoint metadata file displays corresponding OData query. This driver does followings for you.
- Let you Login to CRM by using common login window.
- Register your application to Azure AD on your behalf. If CRM signed-in user does not have enough privilege, you will be prompted to signin as Azure AD Admin.
- Download metadata file for you.
- Generate context by using the metadata file and OData Client T4 Template.