AADSTS50011 Error on iOS App Using SSO with Redirect URI ionic://localhost

Kenneth Shon 0 Reputation points
2025-06-20T12:48:43.1066667+00:00

Hi,

I have an SSO app registered in Azure AD. The app is built using Ionic, and it works correctly on Android and desktop web platforms. However, I encounter an error when using the iOS app:

AADSTS50011: The redirect URI ionic://localhost/ specified in the request does not match the redirect URIs configured for the application.

This issue seems specific to iOS. The redirect URI ionic://localhost/ is being used by the Ionic WebView in iOS, as described in the Ionic documentation. However, Azure AD does not allow registering ionic://localhost/ as a valid redirect URI, as it only accepts https:// or http://localhost.

I would like to know:

Is there any way to register ionic://localhost or capacitor://localhost as valid redirect URIs for native iOS apps using Azure AD?

If not, what is the recommended approach for handling SSO in this scenario?

Thanks in advance!

Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,409 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Raja Pothuraju 23,465 Reputation points Microsoft External Staff Moderator
    2025-06-20T15:34:00.1833333+00:00

    Hello Kenneth Shon,

    According to the best practices and limitations for Redirect URIs involving localhost, your application must use http://localhost:8080 as the Redirect URI (reply URL). The URI must always begin with the http:// scheme. Otherwise, such Redirect URIs cannot be added to Microsoft Entra applications due to platform restrictions.

    For more details, please refer to the following documentation:

    Redirect URI (reply URL) restrictions and best practices – Localhost exceptions

    User's imageI hope this information is helpful. Please feel free to reach out if you have any further questions.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.