integrating third party application with Dynamics CRM - dynamics-crm

I'm trying to integrate third party application with the dynamics CRM.
Authenticate the Dynamics User > Importing all the users data into third party application is my target.
But I'm unable to find the proper way to do this. I have gone through the developer docs but didn't find the solution. Can anyone please help me with this ?

Thanks for the clarification. You can get the Web API URL from Settings > Customization > Developer Resources > Instance Web API.
It will be something like:
https://myOrg.api.crm.dynamics.com/api/data/v9.1/
Using that URL you can query the system and get JSON results.
Going to the root URL will give you the collection name (a.k.a. EntitySetName) of all the entities in the system (which for users is systemusers).
Generally the EntitySetName will be the plural of the entity (i.e. just add 's'), but there are some quirky rules for making plurals so its best to confirm the entity set name via the API or a tool like XrmToolbox's Metadata Browser.
The most basic query for users would be:
https://myOrg.api.crm.dynamics.com/api/data/v9.1/systemusers
It will return all fields of all users.
To get a set of fields:
https://myOrg.api.crm.dynamics.com/api/data/v9.1/systemusers?$select=salutation,fullname,jobtitle,createdon,internalemailaddress
To add a couple filters:
https://myOrg.api.crm.dynamics.com/api/data/v9.1/systemusers?$select=salutation,fullname,jobtitle,createdon,internalemailaddress&$filter=isdisabled%20eq%20false%20and%20address1_line1%20ne%20null
Of course you have to do this with Java's XmlHttpRequest. When querying data you can use HTTP GET.
To test the above queries quickly you can simply login to the D365 web client then paste a query into the browser's address bar.
You may also want to check out Jason Lattimer's CRMRESTBuilder. While it doesn't build Java, it gives you a UI to create JavaScript XmlHttpRequests, which you can then translate to Java.
And here's some Microsoft documentation on querying the Web API.

Related

How should I consume a configuration entity on partner portal?

Xrm.WebApi.retrieveMultipleRecords is available on CRM form.
Is there any way to query web api from the javascript on webpages?
Unfortunately we cannot use Xrm.WebApi in portals and they are native to CRM forms.
Recently web api is introduced for portals and you can use it for CUD operations from portal. MS documentation and this blog post can help you to understand and setup the pre-requisites like enabling settings, permissions, verbose.
For entity data retrieval - still we have to use fetchxml liquid tag. Read more

Use Application Insights to view all REST API requests per user

We are developing a WebApi2 application. Users can use the REST API using their specific API key. I am investigating how to setup Application Insights to be able to see the usage of the REST API endpoints per user.
I have been experimenting with using telemetryclient.TrackPageview(endpoint-ID) and telemetryclient.TrackEvent(endpoint-ID), but I am not sure if this is the right way to go. And how should I pass the user-ID (API-key) in the tracking call? As telemetryclient.Context.User.Id? Or using properties or some other way? I would like to be able to use the user-ID to aggregate/segment the pageviews/events that were registered for that particular user. Any ideas are welcome!
I'd suggest using the built in properties, like context.user.id whenever possible, and then custom properties after that.
Currently in the portal, from the search view you can then find an item for any user, then use the "related items" to view "all telemetry for this user" to see all of the items.
Then can use the App Analytics portal to do queries (click the "analytics" button toolbar in the overview blade for your resource azure portal to go to the AA site for that resource), and that service lets you write much richer queries.
in those queries, it's easiest to group/filter on the "built in" properties, for custom properties you have to write a little bit more complicated queries to parse the values out of custom code.

Is there a possibility to get data from google analitycs to CRM via API or else?

We have an web site and CRM. User fills form on a web page then we send this data into CRM as contact. Also Google analitycs gets more info about this user directly from web site. Is there any possible way to get data from Analitycs to combine it with CRM data?
If this is important: Bitrix24.com is used as CRM (installed on our server).
Thanks in advance.
You need this web-site: https://developers.google.com/apis-explorer/?hl=en#p/analytics/v3/analytics.data.mcf.get to construct API-request.
Set your CustomerID in filters field like this: mcf:adwordsCustomerIDPath=={customerID1}

How to Generate Typed Data Definition for Web Api Odata

I have read this document "http://jaydata.org/blog/how-to-use-jaydata-with-asp.net-web-api---i" and it shows a very clear and simple way to user web api odata, but in this example, all the data types are defined manually, and I read the words from the document
"The ASP.NET Web API provider does not use server generated metadata to setup the client. You need to provide the JayData library with some information about the data types your about to deal with. This at the moment you can only do manually. Version 1.2.7 of JayData brings Visual Studio development time support for autogenerating the client environment."
Currently, the version 1.2.7.1 is released, but I can't find any information that how to use some tools from jaydata to auto generate these data types.
Is there any document for this?
Yes, we promised it and we did a proof of concept but nobody has asked about it since that post, you're the first, so we think that our current users are happy with either creating the model manually or using WebAPI with oData where the model can be built either dynamically from $metadata or statically with JaySvcUtil.
I can not promise any date when we'll release it.
Can't you just use WebAPI with oData ?

Google analytics API issue with domain name

I have a public facing site e.g. www.mysite.domain.com which I have registered under Google console API to get API_ID & Client_ID. Which I am using in my javascript.
Now I have another site which I have to specially use for reporting purpose e.g. www.reports.domain.com. However when I use my - mywebsite API & ClientID values on reporting site I am unable to see data.
Both sites are on same machine and same instance of application - DotNetNuke framework
Can anyone tell me what more I have to do, so that I can see data on one site on to another.
Thanks,
Avinash

Resources