javaandroidazureonedriveazure-ad-msal

Android MsalClientException BrowserTabActivity is missing


I'm struggling with the Onedrive integration in my Android JAVA app.

What I did:

I get the signature hash from my keystore 9..................4=

I do the MSAL configuration via the Azure Portal and copy the content from the azure portal into the JSON file. Supplemented by the entry

“account_mode” : “SINGLE”,

So I have the JSON-File and put it in Res/Raw Folder.

{
 "client_id" : "3...-....-....-....-......d",
 "authorization_user_agent" : "DEFAULT",
 "redirect_uri" : "msauth://com........app/9..................4%3D",
 "account_mode" : "SINGLE",
 "authorities" : [
   {
     "type": "AAD",
     "audience": {
     "type": "AzureADandPersonalMicrosoftAccount",
     "tenant_id": "common"
     }
    }
  ]
}

I am inserting the manifest file (= replaced at the end by %3D):

   <activity
        android:name="com.microsoft.identity.client.BrowserTabActivity"
        android:exported="true">
        <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:host="com........app"
                android:path="/9..................4%3D"
                android:scheme="msauth" />
        </intent-filter>
    </activity>

Error Message: com.microsoft.identity.client.exception.MsalClientException: Intent filter for: BrowserTabActivity is missing.

Manifest entry exists. I can't find a solution for it. The solutions found in here in Stackoverflow didn't work for me.

Thanks GGK


Solution

  • changed "authorization_user_agent" : "DEFAULT", to "authorization_user_agent" : "WEBVIEW", and it works.