Hello, everyone, and welcome back to Microsoft Dynamics 365 or CRM interview questions and answers,
video series. In this video will see how you can use Dynamics 365 Web API?
Well, first of all, we'll see what is Dynamics 365 customer engagement Web API?.
I'll give you a brief introduction about this.
Then we will see what are the prerequisites that you need to follow before using Dynamic 365 for customer
engagement.
Web API and then we will see a practical demo of how we can start using Dynamics 365 customer engagement
Web API.
And using that we will create a record into our dynamics 365 trial instance.
And lastly, we'll see what's next and what topics that we are going to cover in our next Video.
So having said that, ladies and gentlemen, my name is Abhishek Dhoriya and you are watching Dynamix Academy
12
00:00:51,365--> 00:00:52,150
YouTube channel.
So let's get started. subscribe to Dynamix Academy and Press the bell icon to never miss a video from Dynamix
Academy.
So let me now begin by giving you a very brief introduction about what is dynamic 365 customer engagement,
Web API. customer engagement Web API provide the development experience that can be used across a
wide variety of programming, languages, platforms and devices, and the way we implements all data,
which is open data protocol version 4.0 and or is the standard for building and consuming restful APIs
or each set of data sources.
So basically Dynamics365 API implements and data protocol, which is again and always the standard
for building arrays.
Polybius So if you want to read more about this protocol, then you can browse this www.Odata.org
site.
Or if you want to learn more about the standard, then you can find the useful link given on your screen.
We put this link in the description box as well.
At the same time, you might need to keep in mind that both customer engagement on-premise and online,
as well as common data services, share the same web.
And if you want to navigate through the documentation which is available for power apps, then you can
browse this link.
We will see if this link in the description works as well.
So on that note, let us now see what are the basic prerequisites that you need to have before using
this customer engagement webpage on your screen, you can see a list of must haves or must prerequisites
that you need to have before you start using this dynamic through software.
First of all, you need to have a visual studio.
Twenty, seventeen or higher is recommended.
You must have an Internet connection.
You must have a valid user account for Common Data Service instance, your username password and you
are allowed to connect to your CDS environment.
And lastly, and one of the most important skills that you must have is you must have at least a basic
understanding of sheesha language next set of prerequisites.
If you have it, then it would be very good for you, which is the most aerodynamic 365 SDK installed
on your PC.
If you want to see the step by step process of STK installation, then you can follow the video link
given here.
And lastly, what you need to have is a dynamic 365degree, your trial instance or an instance.
You can set up a dynamic 365patrol instance by going to our video link here.
On that note, let me show you the step by step process of how you can connect to Dynamics 365 using
customer engagement and will try to create a record as well.
So I'm opening my visual studio here.
I open my visual studio.
The very first thing that you need to do is you need to create and project of control application type
and click on next time giving project a meaningful name.
But make sure that you, whatever the framework that you are listing here, should be four point six
point one or higher, because by default it will support one point two protocol.
Otherwise, you may need to add one more extra line if you're using any look below to that.
So I'm just creating a new project.
First of all, you need to right.
Click on references, then click on managed to get packages and here you can go to the browser and type
Azure active directly.
The very first package, which is Microsoft identity model clients got a unit to select that and make
sure that you do not install the latest version, it may or may not be compatible with whatever the
demo that I'm showing up here.
So just do one, two, nine version of the new package and click on install, then click.
I accept here.
Once it is installed, you need to install another new package which is new of so you can install the
latest version of this and click on install again the same procedure.
And now you can see you have the new of Jason Delenda have to replicate references as well.
So these were the key differences after doing this.
What you need to do next is you must tell your dynamic petrolist.
So this is my Dynamics365first instance.
You can see.
So what you need to do is you need to register this dynamic 365 trellises as an app in your as your
active directory.
Why this is important?
Because if you want to connect to your door dynamics, for instance, through Rebibbia, then first
you need to authenticate that logged in user.
So how you will be able to authenticate for authentication purposes, you need to register your dynamic
364 app into your active directly to do that.
Whenever you subscribe to, since you by default haven't as your subscription as well.
So now you get to your as your subscription, you need to get to put your dot com.
It will by default, take your login user credentials.
Now, your time as your active director here as well.
So once you saw that as your interest rate will open up an interface like this, so here you need to
register your app.
So just click on add restrictions and click new registration, you or meaningful name to your app,
then select the second account in any organizational directory and you can simply register here and
then you need to gain the manifest for this particular.
So just click on Manifest, it is also listed out here, and you can see right now the allow public
land is set to know what you need to do it through.
So after changing the value from null to click on sale, now, once it is sale, you can do you the
permissions as well to click on API permissions and then you need to click on add permission here,
select Dynamic CRM permission here and select the user information and permissions.
So once permissions are added, you need to grant admin consent.
Just click on this button as well and it will ask for your confirmation.
Click Yes.
And.
Do not forget to grant the admin consent, because if you miss this, then you will face arrest while
running your home.
The message will clearly read out that admin has not granted consent for this organization whenever
you are connecting through your.
So do not forget to grant admin consent for this one from total subscription as well.
So now the record set about authentication is done.
So let me know.
I can switch back to my visual studio and will connect to this organization using a webpage.
Let me know.
Start breaking the code for, first of all, how to authenticate.
And then I will show you all the for the record, as you can see, I return some using statements.
You can use the same using statement.
And I modified the my main method with some line of code.
So first of all, what I'm doing.
Let me know.
112
00:08:40,365--> 00:08:41,640
Explain these lines of code.
So I'm using three variables of string that you are a username and password.
This you can get it from the dynamics CRM more dynamic environment.
You are your login username and your password that you normally use to log into your dynamic.
And then this client data that you will get this client data from the as your portal where you register
your dynamic 365 as a new app and then you need to specify the API version of your dynamic 365 and you
can build an API webpage.
You are like this and then you are using some authentication parameters and then you need to authenticate
using when my response, if it is successful, then what I'm writing here is my user ID and printing
my user and if it is filled, then I'm printing a message called user request filled with so and so.
What does it mean?
So let me know.
Replace the standard code with the actual data I copied.
Then you're logged in username, then your password.
Now I removed this generic curity.
Then I will get this client data from my portal subscription for that again.
I will go back to my hotel subscription and you will see that my current application name of the definition
is this one an application or the client data you can see here.
You need to simply copy this data from here and paste it here.
So this is my client data.
And before running this code, you need to make sure that your EPA will be matching with your dynamics
as you check your dynamic status.
If you can verify by wearing to urban settings, it will open up a page like this and then you need
to click on customizations.
And here you can see the of resources.
Here you can see that there is API.
You are.
So this is you can now see the version is nine point one.
So you need to update your users to your board.
So I will change my version.
So now my authentication coding is done.
These are the main changes that you need to do.
You need to apply change your your username and password client any and thus verify your API version
is what I will simply run this program.
So now you can see I successfully logged in and my site has given my user ID, which is the success
criteria, is bringing me this user idea, this message.
If it is successful, then I'm bringing my user ready so it is working correctly.
So that means I'm authenticated successfully to my dynamic.
Listen to that instance using the web.
Now let me show you how you can create the code using these APIs for all the operations going ahead.
So now you can see that there are some extra additional using statements that I read and I read one
Metropol to create record where I'm passing this client, A.P. Klein authenticated it.
Client is my input parameter and that I'm declaring one.
There's an object called contact one and then passing a very few attributes like first name, last name,
annual income and job title.
And I'm creating a record with the request method.
And now you've got some sort of response, if the response is successful, then I'm think or succeeded
and created otherwise I'm creating Operation Fail.
So this is how I'm creating a according to my dynamic 360, for instance.
And here you can notice one thing that I've never used a service object, anything.
I'm not using service to create matter anywhere.
I'm simply using my background.
So now I wouldn't call this method after authentication is successful.
So I'm just following that method and passing the authenticated blind people to let me know.
Once again from this.
You can see now I'm getting a message board to target and created from my credit record methods.
Stop this.
Let us know.
Verify whether this this record actually got created into my trial instance or not.
The name of the contact is demo contact.
So I never get to my trial and this is my trial instance.
And what I will do is I will simply never get to my contacts.
174
00:13:24,365--> 00:13:28,320
In this trial instance, I rename the context as individuals.
So now you can see that my contact has been created.
So this is how you can create a record of using dynamic.
On that note, let us know what is next.
If you still have any questions or any doubts, then please feel free to leave a comment and help us
in deciding the next video that you want from us.
For the time being, we have got two options for you, which is you can go whether you want us to prepare
or lipreading and literally read your what is already binding and binding in Dynamics365.
I will explain in detail as well as the other video is what are the possibilities of integrating my
philosophy into the dynamics of how you and what are the features, if it is possible or not?
If yes, how and what are the features that are level in the integration of all those queries and information?
If you want, then you can type of PIMS integration in this comment of this video, or if you want to
see the branding and trading concept, then you can simply take that into the description box or that
comment box as well.
So on that note, I will end this video.
You can connect with us on all the social media platforms, especially if you would like to get the
live updates you can connect to WhatsApp group.
The link of all the social media platforms are shared in the description box.
So having said that, I thank you for watching this video till the end.
So if you learn something new out of this, you can please, like, share and subscribe to Dynamic's
Academy and also press the Billiken so that you will never miss any of that whenever we release a new
video to our Dynamics Academy, YouTube channel.
And on that note, I and this video and take your new hope to see you all in the next video.
Till then, bye bye and take care.
And once again, thank you for your time.
