1

I am getting this error:

com.microsoft.identity.client.exception.MsalClientException: Unable to perform cloud discovery

when calling this method:

b2cApp.acquireToken(parameters);

from this object:

private IMultipleAccountPublicClientApplication b2cApp;

I have looked through a few threads:

Unable to perform cloud discovery #443

Unable to perform cloud discovery error from MSAL library of Android #676

Unable to perform cloud discovery error from MSAL library

I can't tell if this is an Android configuration issues (allowing the discovery) or if there is some issue with my Msal configuration. I think the former as I would hope to get a better error message back specifically referencing what could not be discovered. I believe there is a reference to that in the GitHub link as well. Any thoughts?

lcj
  • 1,355
  • 16
  • 37

2 Answers2

0

I added these two lines to the AndroidMainfest.xml file based on information provided by the Azure B2C team:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
lcj
  • 1,355
  • 16
  • 37
0

This occurs when emulator loses access to the internet/network. Opening the Chrome browser indicates no websites (such as google.com) can be loaded.

As suggested by other questions & answers, I tinkered with my DNS network settings (such as turning on DHCP assigned DNS; not sure how that got turned off) and disconnected/reconnected my Ethernet cable.

Peter L
  • 2,921
  • 1
  • 29
  • 31