[Azure AD Mobile Plugin] Error on validating token

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

Hello,

I tried to use this plugin and couldn't use properly.
Does anyone help me?

All steps I did are as following comments.

1. I registered my application to Azure Portal.
Redirect URL was set as below.

2. "Access directory as the signed user" was added to Microsoft Graph in API permissions.

3. Site property Client_IdentityProvider of ADALPlugin module was set with "https://login.microsoftonline.com/takasimoriyan.onmicrosoft.com/"


The value of I used above was made of my domain. I referred following Microsoft's page.
https://docs.microsoft.com/azure/active-directory-b2c/tutorial-add-identity-providers#add-the-identity-providers

4. I created a test mobile app and placed a button with following action.


The ClientId value I entered was from my azure portal.

5. The test app was built for developing and installed onto my iOS device. Then I tried to perform ADALLogin and got an error.


The error log in Service Center said as follows.

Validate Token and User error: IDX10205: Issuer validation failed. Issuer: '[PII is hidden]'. Did not match: validationParameters.ValidIssuer: '[PII is hidden]' or validationParameters.ValidIssuers: '[PII is hidden]'.

It seems that the error was occurred on validating token.
But I couldn't figure out a way to correct the problem.

I would appreciate your helping me.

Best regards,
Moriya Takasi

Solution

I figured out the cause.
I had to set Client_IdentityProvider site property with "https://sts.windows.net/<my-tenant-id>/."

My tenant id was shown in azure portal.


I found the solution from the comment.
https://www.outsystems.com/forums/discussion/45254/adal-issue-microsoft-is-not-defined/#Post175351

Thanks.

Solution