[Enter feedback here]
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@samsil
Thanks for your feedback! We will investigate and update as appropriate.
@hamiltonha Haley, as @samsil calls out, it seems we have an empty ADALError to MsalException ErrorCode section in this doc - looks like it was missed on initial publish. Assigning over to you for investigation: #reassign:hamiltonha
Instead of filling out that section, though, what about adding an ADALError equivalent column to the table in the previous section? Not sure they translate one-to-one, however, so if completing the ADALError to MsalException ErrorCode section makes more sense, we should go that route.
Something like this:
Migrate to the new exceptions
In ADAL, there's one type of exception,
AuthenticationException, which includes a method for retrieving theADALErrorenum value. In MSAL, there's a hierarchy of exceptions, and each has its own set of associated error codes.The following table shows a mapping between ADALErrors and their MsalException equivalents.
| MsalException | Description | ADALError equivalent |
|:-------------------------------------------------|:--------------------------------------------------------------------|:---------------------|
|MsalException| Default checked exception thrown by MSAL. |{ADALError here}|
|MsalClientException| Thrown if the error is client side. |{ADALError here}|
|MsalArgumentException| Thrown if one or more inputs arguments are invalid. |{ADALError here}|
|MsalClientException| Thrown if the error is client side. |{ADALError here}|
|MsalServiceException| Thrown if the error is server side. |{ADALError here}|
|MsalUserCancelException| Thrown if the user canceled the authentication flow. |{ADALError here}|
|MsalUiRequiredException| Thrown if the token can't be refreshed silently. |{ADALError here}|
|MsalDeclinedScopeException| Thrown if one or more requested scopes were declined by the server. |{ADALError here}|
|MsalIntuneAppProtectionPolicyRequiredException| Thrown if the resource has MAMCA protection policy enabled. |{ADALError here}|
@hamiltonha Ping on this Haley, we still have an empty section on this doc.

If you can provide an MSAL-to-ADAL mapping for me for the errors in the table above that section, I can update the doc with the new column in the table as proposed in https://github.com/MicrosoftDocs/azure-docs/issues/61007#issuecomment-674972923.
@mmacy acked - will get to it shortly
@samsil This section has been populated and now appears as such:
| If you're catching these errors in ADAL... | ...catch these MSAL exceptions: |
|--------------------------------------------------|---------------------------------------------------------------------|
| No equivalent ADALError | MsalArgumentException |
|
ADALError.ANDROIDKEYSTORE_FAILEDADALError.AUTH_FAILED_USER_MISMATCHADALError.DECRYPTION_FAILEDADALError.DEVELOPER_AUTHORITY_CAN_NOT_BE_VALIDEDADALError.EVELOPER_AUTHORITY_IS_NOT_VALID_INSTANCEADALError.DEVELOPER_AUTHORITY_IS_NOT_VALID_URLADALError.DEVICE_CONNECTION_IS_NOT_AVAILABLEADALError.DEVICE_NO_SUCH_ALGORITHMADALError.ENCODING_IS_NOT_SUPPORTEDADALError.ENCRYPTION_ERRORADALError.IO_EXCEPTIONADALError.JSON_PARSE_ERRORADALError.NO_NETWORK_CONNECTION_POWER_OPTIMIZATIONADALError.SOCKET_TIMEOUT_EXCEPTIONMsalClientException |MsalDeclinedScopeException |ADALError.APP_PACKAGE_NAME_NOT_FOUNDADALError.BROKER_APP_VERIFICATION_FAILEDADALError.PACKAGE_NAME_NOT_FOUNDMsalException |MsalIntuneAppProtectionPolicyRequiredException |ADALError.SERVER_ERRORADALError.SERVER_INVALID_REQUESTMsalServiceException |ADALError.AUTH_REFRESH_FAILED_PROMPT_NOT_ALLOWED | MsalUiRequiredExceptionMsalUserCancelException |