active-directory-b2c-xamarin-native: Redirect URI not working on Android

Hi all,

I followed the procedure described in the readme. On iOS it works as expected, but on Android, I can provide my credentials but then I get “This site can’t be reached”, It shows the expected redirect url msal{appid}😕/auth/?state={very long token} ERR_UNKOWN_URL_SCHEME.

This is my manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
	<uses-sdk android:minSdkVersion="15" />
	<application android:label="XXXXXX"></application>
  <activity android:name="com.microsoft.windowsazure.mobileservices.authentication.RedirectUrlActivity" >
    <intent-filter>
      <action android:name="android.intent.action.VIEW" />
      <category android:name="android.intent.category.DEFAULT" />
      <category android:name="android.intent.category.BROWSABLE" />
      <data android:scheme="msal{appid}" android:host="auth" />
    </intent-filter>
  </activity>
</manifest>

I have replaced {appid} with the id of my native application, not that of the API application.

My MainActivity contains the overridden OnActivityResult from the sample.

Please advise.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 28

Most upvoted comments

@jennyf19 I am using the version 1.1.1-preview0040, and runs OK.

Hi everybody, @josuuribe, @pedramp20 I need your help. I Implement a PCL project with versions of iOS and Android. iOS works fine, but Android version, the app open the login with Microsoft, but when redirect, i have the next error:

Java.Lang.RuntimeException Unable to instantiate activity ComponentInfo{com.myapp/com.microsoft.identity.client.BrowserTabActivity}: java.lang.ClassNotFoundException: Didn’t find class “com.microsoft.identity.client.BrowserTabActivity” on path: DexPathList[[zip file “/data/app/com.myapp-1/base.apk”],nativeLibraryDirectories=[/data/app/com.myapp-1/lib/x86, /data/app/com.myapp-1/base.apk!/lib/x86, /system/lib, /vendor/lib]]

I use a device with Chrome installed, and use the same AndroidManifest.xml that you post here.

Any suggestion please?

Thanks in advance!