Menu
Who Do Is
  • Home
  • What
  • How
  • Is
  • Can
  • Are
  • Does
  • Do
  • Why
  • Who
  • Where
  • Which
  • Which
  • Should
  • Will
  • When
  • What’s
  • Did
Who Do Is

[ANSWERED] android – msalclientexception redirect URI does not match

Posted on November 14, 2022

Solution 1 :

I test the sample code and it works fine.

Make sure that you need to follow this part to configure your Azure AD app.

There are two files need to be configured: AndroidManifest.xml and auth_config.json.

My configuration for your reference:

auth_config_multiple_account.json

{
  "client_id" : "6cXXXXa2-295d-455a-88fe-b1XXXXXXXX0e",
  "authorization_user_agent" : "DEFAULT",
  "redirect_uri" : "msauth://com.azuresamples.msalandroidapp/1wIqXSqBj7w%2Bh11ZifsnqwgyKrY%3D",
  "authorities" : [
    {
      "type": "AAD",
      "audience": {
        "type": "AzureADandPersonalMicrosoftAccount",
        "tenant_id": "common"
      }
    }
  ]
}

AndroidManifest.xml

<data
                    android_host="com.azuresamples.msalandroidapp"
                    android_path="/1wIqXSqBj7w+h11ZifsnqwgyKrY="
                    android_scheme="msauth" />

Azure AD app

enter image description here

Problem :

I have to integrate Microsoft authentication API for login in the android app. for that I registered my app to the Azure portal, by providing a package name and Signature hash.
Signature hash is generated using this command
keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%.androiddebug.keystore | openssl sha1 -binary | openssl base64

on app run, I’m getting this exception
MsalClient Exception: The redirect URI does not match with the package name and signature hash.
but both the package name and signature hash is the same at android and Azure. im following this tutorial
https://learn.microsoft.com/en-us/azure/active-directory/develop/tutorial-v2-android

Comments

Comment posted by Allen Wu

Hi did you have a chance to look into my update in comment under answer? Is it helpful?

Comment posted by Allen Wu

@iSevaDigital You need to specify the path. My example for your reference:

Comment posted by stackoverflow.com/questions/7506392/…

@iSevaDigital You can also refer to

READ  [ANSWERED] java - how to edit the data present in arraylist of custom objects stored in shared preference?? i am using this class to storing and accessing
Powered by Inline Related Posts

Recent Posts

  • How can I play with my cat without toys?
  • What is a bag pipe band called?
  • Are Honda Civics actually fast?
  • Are Yankee candles toxic?
  • How do I pair my Michael Kors smartwatch with my Android?

Recent Comments

No comments to show.

Archives

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuántas
  • ¿Cuánto
  • ¿Que
  • ¿Quién
  • 90” and 108” so you may have to round up to the nearest size.
  • and delete any Spotify folders from it. Once this is done
  • Android
  • Are
  • At
  • Bei
  • blink
  • C'est
  • Can
  • carbs
  • Comment
  • Did
  • Do
  • Does
  • During
  • For
  • Has
  • How
  • In
  • Is
  • Ist
  • Kann
  • Können
  • nouveau
  • On
  • or 108 inches.2020-08-03
  • Où
  • owning
  • Pourquoi
  • Puis-je
  • Quand
  • Quante
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • spiritual
  • tap the downward-facing arrow on the top left. A downward-facing arrow will appear underneath each song in the album; they'll turn green as the download completes.2020-07-28
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welcher
  • Welches
  • Welke
  • Wer
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Whose
  • Why
  • Wie
  • Will
  • Wo
  • Woher
  • you will receive two curtains each with the same measurements of width 66"" (168cm) x drop 54""(137cm).
  • you'll see a green downward-facing arrow next to each song.2021-02-26
©2023 Who Do Is | Powered by SuperbThemes & WordPress