The redirect URI in the configuration file doesn't match with the one generated with package name and signature hash
@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
-
Download the sample from this link (https://github.com/Azure-Samples/ms-identity-android-java/)
-
Set up the Authenticator App using this tutorial (https://docs.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-shared-device-mode)
-
Register an app in the azure active directory and add an android platform in the authentication section
-
Generate a config file by providing package name and signature hash
-
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
-
Open AndroidManifest.xml file and change the data path value in BrowserTabActivity (Line No. 35) with the generated signature hash
-
Run the app
-
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
- 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"
- Also change the same in the AndroidManifest.xml (Line No. 34)
ORIGINAL
android:host="com.azuresamples.msalandroidapp"
WORKAROUND
android:host="com.azuresamples.msalandroidappz"
- 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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure-Samples/ms-identity-android-java 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 55/100
-
难度 2/5 1-3 小时 新手友好度 35/100
Azure-Samples/ms-identity-android-java#57 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
-
ADAL packages 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 20/100
查看 Azure-Samples/ms-identity-android-java 的全部 Issue
相似的 Issue
-
area/plugin
难度 2/5 1-3 小时 新手友好度 75/100
kestra-io/plugin-kestra#190 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
apache/rocketmq-dashboard#5064 ·