Login Issue in my android app mircrosoft issue

Amit Goyal 0 Reputation points
2024-11-04T09:42:53.53+00:00

I have integrated Microsoft social sign-in into my app, and it works fine when I build it locally and install it on the device. However, when I build the app locally, upload it to the Play Store, and then download it onto the device, it causes an issue. The app shows an error saying the URI does not match, even though the URI created for my application is correct. Can you help me with this?

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
22,065 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Raja Pothuraju 7,675 Reputation points Microsoft Vendor
    2024-11-05T18:29:31.65+00:00

    Hello @Amit Goyal,

    Thank you for posting your query on Microsoft Q&A.

    Based on your description, it seems you may be experiencing an issue with the redirect URI when using Microsoft social sign-in in your app. The redirect URI is used to return users to your app after they authenticate with Microsoft Entra ID.

    When running your app locally, the redirect URI is likely set to a local URI specific to your development environment. However, once you upload the app to the Play Store and install it on a device, the redirect URI might differ.

    To resolve this, please ensure that the redirect URI in your app matches the one registered with Microsoft Entra ID. Here’s how:

    1. Go to the Azure portal and navigate to Microsoft Entra ID, select App registrations, locate the application registration by using the application ID, and then open the app registration page.
    2. Under "Authentication", ensure that the redirect URI matches the URI that is being used in your app.
    3. If the redirect URI is incorrect, update it to match the URI that is being used in your app.
    4. Save the changes and rebuild your app.
    5. Upload the updated app to the Play Store and download it onto a device.
    6. Test the social sign-in functionality to ensure that it is working correctly.

    Note: The redirect URI must be an exact match. If it doesn’t match exactly, you may see an error similar to the one you mentioned.

    For more details, refer to this document: Error code AADSTS50011: Redirect URI mismatch.

    I hope this information is helpful. Please feel free to reach out if you have any further questions.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Thanks,
    Raja Pothuraju.

    0 comments No comments

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.