Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Richard Jackson 17 posts 127 karma points c-trib
    Aug 27, 2023 @ 09:00
    Richard Jackson
    0

    [SOLVED] Umbraco Backoffice & Azure Active Directory Redirect URIs

    I'm looking to use Azure Active Directory for allowing Users to log-in to the Umbraco backoffice (docs).

    The final hurdle is that, when attempting to log-in, I'm receiving an Azure error stating that my 'redirect_uri' is not valid.enter image description here

    Currently I am using https://localhost:44370/umbraco/ as my redirect URI, a method validated by Shazwazza 's excellent 2018 blog post Configuring Azure Active Directory login with Umbraco. However this is still resulting in the same error.enter image description here

    Does anyone have any suggestions with what I can do to resolve this?

    Annoyingly the same error shows up if my options.ClientSecret value is incorrect, so for this field I'm using the Value field of a Client Secret (i.e. the one starting nw6). I have been using the Secret ID field but that's definitely Not It.enter image description here

    (I'm now going to be blissfully AFK for the next 24 hours - thank you UK bank holidays - so apologies for late responses. If anyone has any suggestions that would make my return to work that much less stressful!)

    Cheers!

    Rich

    Umbraco 10.4.2

  • Richard Jackson 17 posts 127 karma points c-trib
    Aug 29, 2023 @ 09:26
    Richard Jackson
    100

    This has been resolved - required redirect URL is {RootDirectory}/umbraco-signin-microsoft/ - so for me that was https://localhost:44370/umbraco-signin-microsoft/.

    In the docs there is a snippet containing the following code:

    //By default this is '/signin-microsoft' but it needs to be changed to this
                                    options.CallbackPath = "/umbraco-signin-microsoft/"; 
    

    That option defines the required "Web:Redirect URIs" value which needs to be declared in Azure Active Directory.

    Thanks Neil on the Umbraco Discord for the pointer.

Please Sign in or register to post replies

Write your reply to:

Draft