Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Azure AD Authentication in Unity using MSAL

Discussion in 'Multiplayer' started by DavWil, May 15, 2019.

  1. DavWil

    DavWil

    Joined:
    Nov 19, 2018
    Posts:
    1
    Hi First Time Poster, so please be a little patient for my folly.

    I'm building Azure AD authentication into my Android Application, using MSAL 3.x, however it is throwing errors when attempting to Acquire Token with User Interaction. The documentation for MSAL 3.x suggests that the parent activity or window is needed, however using Unity I'm pretty lost with this. Any help here would be much appreciated.

    I have tried a variety of input suggestions from the main documentation, but none of them seems to fit for Unity. The documentation can be found at: https://github.com/AzureAD/microsof...or-dotnet/wiki/Acquiring-tokens-interactively

    I'm now pretty sure that I need to use UnityPlayerActivity to get the android activity for the parameter below, but I'm extremely lost in this area. Any help would be hugely appreciated.

    authResult = await app.AcquireTokenInteractive(scopes).WithParentActivityOrWindow("need something here").ExecuteAsync();
     
  2. ElCodeMonkey

    ElCodeMonkey

    Joined:
    Jan 1, 2017
    Posts:
    3
    You ever figure this out? I would absolutely love a solution! Been working on this for weeks and simply can't get the window to pop up!
     
  3. francescocagnetta

    francescocagnetta

    Joined:
    Jun 11, 2018
    Posts:
    13
  4. cha_boy_nate

    cha_boy_nate

    Joined:
    Jul 22, 2015
    Posts:
    3
    This should be revisited
     
  5. JanaSivaKumar

    JanaSivaKumar

    Joined:
    Aug 23, 2023
    Posts:
    2
    Hi, any leads to the above problem? I am stuck while using MSAL, not able to open browser for authentication
     
  6. JanaSivaKumar

    JanaSivaKumar

    Joined:
    Aug 23, 2023
    Posts:
    2
    Hi, Any leads to the above problem? I am not able to open browser for authentication using MSAL