Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

The redirect URI in the configuration file doesn't match with the one generated with package name and signature hash

オープン
#46 コメント 8 件 リアクション 0 件 担当者 1 名 GitHub で見る

@rpdome がすでに取り組んでいます。

2021年2月2日 から。

評価

この issue はまだ評価されていません。

説明

Basic information:

I am trying out the sample from this link (https://github.com/Azure-Samples/ms-identity-android-java/)
 to integrate with Microsoft identity platform
The sample app is working fine with the default configuration.

I also followed this tutorial (https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-shared-device-mode)
to enable shared-device mode using the Authenticator app.

This also working fine.
The problem occurred when I replace the client Id and other configurations in the config file using
 the App registration from our Azure Active Directory 

Please find more details in the repro steps below
Minimal steps to reproduce
  1. Download the sample from this link (https://github.com/Azure-Samples/ms-identity-android-java/)

  2. Set up the Authenticator App using this tutorial (https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-shared-device-mode)

  3. Register an app in the azure active directory and add an android platform in the authentication section

  4. Generate a config file by providing package name and signature hash

  5. Then open the sample app and open the auth_config_single_account.json file and replace content with the file generated from the App registration in Azure Active directory

  6. Open AndroidManifest.xml file and change the data path value in BrowserTabActivity (Line No. 35) with the generated signature hash

  7. Run the app

  8. On opening the app, it is showing the following exception.

com.microsoft.identity.client.exception.MsalClientException: The redirect URI in the configuration file doesn't match with the one generated with package name and signature hash. Please verify the uri in the config file and your app registration in Azure portal.

I have found a workaround for removing this error as follows. But this workaround doesn’t make the application to run in Shared-Device mode and the app is working in regular mode only even though the “mSingleAccountApp.isSharedDevice()“ returns ‘true’

Workaround steps
  1. Add a extra character like typo in the redirect uri in the config file as shown below and also include this redirect uri in the app registration in the azure active directory

ORIGINAL

"redirect_uri" : "msauth://com.azuresamples.msalandroidapp/ga0RGNYHvNM5d0SLGQfpQWAPGJ8%3D"

WORKAROUND

"redirect_uri" : "msauth://com.azuresamples.msalandroidappz/ga0RGNYHvNM5d0SLGQfpQWAPGJ8%3D"

  1. Also change the same in the AndroidManifest.xml (Line No. 34)

ORIGINAL

android:host="com.azuresamples.msalandroidapp"

WORKAROUND

android:host="com.azuresamples.msalandroidappz"

  1. After these changes, the app is working in regular mode but not working in Shared-Device mode

Please help me resolve this issue.

Device Details

Device : Redmi 4A
Android version: 7.1.2

@rpdome For traceability, mentioning the microsoft support ticket number 120120326004885

Mention any other details that might be useful

Thanks! We'll be in touch soon.

主要言語
Java
スター
34
フォーク
30
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Azure-Samples/ms-identity-android-java のほかの issue

Azure-Samples/ms-identity-android-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。