top of page
  • Kyle Hill

Kylie Bot Part 3 - Creating a Portal With Authentication

Now that we have a Dynamics 365 instance and an associated portal, let's go and link these two up to our Kylie Bot. This requires a bit of work in the Dynamics instance. Let's start by logging into the instance with the details from the previous post where we created our trial instance. Navigating through the Office 365 landing page to the Dynamics 365 tile should present the standard Dynamics 365 landing page where we can navigate to a new section that will have been added with our deployment of the portal. Under this 'Portals' section, let's click on 'Site Settings' as follows:

We will now be presented with a list of settings that are specific to the portal that we have just deployed. If you have more than one portal deployed, keep this in mind as we navigate to the correct items in the next steps. For my example, we will be using the settings related to the partner portal we just deployed and I have filtered the view as such. The two items we will be looking for are the following:

Authentication/OpenAuth/Microsoft/ClientId

Authentication/OpenAuth/Microsoft/ClientSecret

If these entries do not exist, feel free to create them. The only part left to do now is to create an additional app for the portal registration like we did for Kylie Bot in Part 2, and input the details into these items where the value field is available for input. As a reminder, you can register an app here and the settings will be presented like this:

*One thing to note in registering your app this time, is that you will have to specify a redirect URL back to your portal. This is very important else once your have been authenticated, the process will fail if the URL isn't pointed back at the portal we are using. Thus, in the redirect URL section of the app, use the following entry: return url: https://YOUR_PORTAL.microsoftcrmportals.com/signin-microsoft where the 'YOUR_PORTAL' part represents the address of your portal:

Once those settings are updated, we should be good to go! Navigate to your portal URL, mine is: https://askkylie.microsoftcrmportals.com/ and select the 'Sign In' option. You should now be presented with a screen like this:

Take note of the 'Microsoft' option that we now have available to use. This option will authenticate directly against our Kylie Bot app and the Azure Active Directory it is associated with! Superb, lets just tidy this up and remove the local login option as we are going to force users to use a Microsoft authentication method rather than being able to authenticate directly against our Dynamics 365 database.To do this, navigate back to the 'Site Settings' option in your Dynamics 365 instance and this time select the following item and set its value to 'false':

With that change, all we need to do is refresh our portal and this is what we should see:

By clicking on the 'Microsoft' option, you should be challenged as follows:

Completing your details will then result in your portal profile being displayed. This is a portal profile, rather than you profile from the account you just logged in with. As such, go ahead and complete this if you wish:

Brilliant we're all set to start linking our Kylie Bot conversations to records in Dynamics 365! Look out for the next blog post where we will do this.

0 comments
bottom of page