[Azure AD Mobile Plugin] Azure AD Mobile plugin usage

Forge Component
(7)
Published on 16 Jan by Pedro Costa
7 votes
Published on 16 Jan by Pedro Costa

Can someone provide the high-level steps for configuring and using the Azure AD Mobile plugin?

If I remember correctly you need to do the following;

- Install IDP and IDP Mobile

- Define a new (enterprise?) application in Azure AD (Export the XML and certificate)

- Configure IDP to use the app in Azure AD

- Add the needed steps in the applications to allow saml authentication


Read the installation instructions at <your domain>/IdP/Instructions.aspx


PINAL PATEL wrote:

Can someone provide the high-level steps for configuring and using the Azure AD Mobile plugin?

Hi Pinal Patel,

First, you need create a new aplication in your Azure Portal. Find "App Registration" in your portal.

Example:

In Required Permissions, add permission - Microsoft Graph > Access directory as the signed in user

Example:

And now, save your ClientId for configure your app.


In your outsystems app, create a button to open the microsoft login page:

Example:

Thanks !

Pedro Costa wrote:

PINAL PATEL wrote:

Can someone provide the high-level steps for configuring and using the Azure AD Mobile plugin?

Hi Pinal Patel,

First, you need create a new aplication in your Azure Portal. Find "App Registration" in your portal.

Example:

In Required Permissions, add permission - Microsoft Graph > Access directory as the signed in user

Example:

And now, save your ClientId for configure your app.


In your outsystems app, create a button to open the microsoft login page:

Example:

Thanks !


Hi, I'm wondering how to get the url of my application to use in redirecturl input field, is this the same as app link?! as the app should be generated in order to work, so i'm wondering how to get the url. Thanks in advance!

Hi,

for may requirement, I should get user roles and groups. In output structure roles and groups are not defined. Could you please help me to get user roles and groups from active directory.

Regards,

Mahender Reddy C.

Mahendhar wrote:

Hi,

for may requirement, I should get user roles and groups. In output structure roles and groups are not defined. Could you please help me to get user roles and groups from active directory.

Regards,

Mahender Reddy C.

Hi Mahendhar,

For mobile, you can check de return of JWT_ValidateToken.



For Web, check resource atribute from TokenRequest table.


I don't know if this is what you need.


Regards,

Pedro Costa

Pedro Costa wrote:

PINAL PATEL wrote:

Can someone provide the high-level steps for configuring and using the Azure AD Mobile plugin?

Hi Pinal Patel,

First, you need create a new aplication in your Azure Portal. Find "App Registration" in your portal.

Example:

In Required Permissions, add permission - Microsoft Graph > Access directory as the signed in user

Example:

And now, save your ClientId for configure your app.


In your outsystems app, create a button to open the microsoft login page:

Example:

Thanks !

Hi,

I did all the steps described above, but when I click the Login Button I get the Error Message "Cannot read property "ADAL" of undefined".
Anyone got a clue where it comes from?


Hi Moritz,


Have you generated an application and are testing on a device ? Cordova plugins can only be tested on devices.


Regards

Pedro Costa wrote:

Hi Moritz,


Have you generated an application and are testing on a device ? Cordova plugins can only be tested on devices.


Regards

Hi Pedro,

Thanks for your quick answer!
Jeah I tried it and still get the same Error Message.

Do I have to do something else than creating a Button with the logic above?

Greetings

Moritz


Hi Moritz, 

This error occurs because the ADAL library (script) was not loaded. And it can happen for 3 reasons.

1. You are testing in browser instead of native app on device.

2. Not having regenerated the app after adding references to the component.

3. Be using a discontinued version.

Hi Pedro,

I have generated the app and tested it with the OutSystems Now app on my mobile device.
Also I downloaded the latest ADAL Plugin and still get the Error.

I'm sorry, but i don't tested this component with Outsystems Now app


It's android device ? Can you try installing native app ? 


Thanks

Hi Pedro,

Now I installed the application and it works!

Thank you very much!


Edit:

It says my Username/Password is incorrect. Does that have something to do with Azure configuration?

Greetings Moritz

Hi,

What url do I use for the redirecturl input field.


Thanks Dave

Hi Dave,

You must enter the same URL when you created your azure app


Regards

Thanks Pedro,

We are now getting an exception "Microsoft is not defined". We have re-generated the android app. however this makes no difference.

Thanks Dave


Hi Dave,


Are you using a latest version of the component?

This error message usually happens when the application is not regenerated and reinstalled on the device. Validate if you generated and installed the latest version


Regards

Hi Pedro,

The issue was we were testing via Outsystems Now app rather than native. 

With Android native we can how reach the Microsoft login page however when we login we are now getting a IDX10803 and IDX10108 exception.

See below. Any ideas ?


Thanks Dave


Hi Dave,


Your Redirect URI configured is Https ?

Hi Pedro,

Yes, Redirect URI configured is Https


Hi Pedro,

We have found the solution. We needed to add site.Client_IdentityProvider to your plugin. 

The first exception above has no url before ".well-known/openid-configuration".

We could probably add this to the e-space site properties for the ADALPlugin.


Dave