Windows Autopilot with User-Driven Hybrid Azure AD Domain Join using Palo Alto GlobalProtect VPN: Part 2, using GlobalProtect PLAP with Basic Credentials

I recently had a call with another company attempting to setup Autopilot following my previous post (Windows Autopilot with User-Driven Hybrid Azure AD Domain Join using Palo Alto GlobalProtect VPN). While speaking to them I learned that are currently using basic credentials (LDAP+RADIUS) with GlobalProtect and are only attempting to setup certificate authentication to get Autopilot working. They were still planning on having the user perform two-factor basic authentication after the Autopilot-based deployment. This configuration was the perfect use-case for GlobalProtect’s new “Use Connect Before Logon” functionality. This functionality was introduced version 5.2 and works by registering a Pre-Login Access Provider (PLAP). With PLAP you now have interactive access to the GlobalProtect client at the logon screen. A huge plus with this method is that it requires NO back-end changes to your existing GlobalProtect configuration. The functionality is completely client-side and only really requires an additional step during installation. This PLAP functionality works with basic credentials, certificates, and even SAML! I will be using basic two factor credentials below.

The first step will be to create a new GlobalProtect package in Intune. I am using the newest version below, 5.2.7. You can use the same steps for creating the package that I laid out in my first post, but we will be using an alternate wrapper script, InstallGlobalProtect_PLAP.ps1. InstallGlobalProtect_PLAP.ps1, will install GlobalProtect, set our default GlobalProtect portal, and register the Pre-Login Access Provider (PLAP). Everything else non-certificate related in my original post will still apply (ex. IntuneHybridJoinHelperInstaller.ps1).

Once the machine has been deployed you will notice an extra button in the lower right. This is the PLAP.

When clicked, GlobalProtect will attempt to connect to the portal configured in the wrapper script and you will be presented with a screen like the one below. The prompts here will vary based on your authentication method. Here I am being prompted for my LDAP credentials to authenticate to the portal.

Once I passed the correct credentials here (and the correct second set of credentials at a second screen for two-factor) I was connected.

At this point you can click the ‘Back’ button and continue to log in to the device. That’s all there is to it! This is a great option for those of you who are lacking the desire to use certificates in your existing GlobalProtect configuration, but want to start using Autopilot.

42 thoughts on “Windows Autopilot with User-Driven Hybrid Azure AD Domain Join using Palo Alto GlobalProtect VPN: Part 2, using GlobalProtect PLAP with Basic Credentials

  1. Pingback: Windows Autopilot with User-Driven Hybrid Azure AD Domain Join using Palo Alto GlobalProtect VPN | Maniacal Methods

  2. RWarrick66

    Thanks so much for “Part 2”!! This put the work back in my hands and cut the security team loose from the additional certificate work.

    I only have one issue. The GP client attempts to connect upon login, after every reboot. It obviously fails since the client is now on the office network. Is this by design or did I miss something.

    1. Mark DePalma Post author

      I’m glad this could be helpful!

      So, one option for this is to configure internal host detection. This way GlobalProtect will detect you are internal to the network and won’t attempt to establish a connection (or will try to connect to the “internal” gateway if one is configured).

  3. lkg907

    Hey Mark, I ran into an issue with trying to get this setup. I’ve experienced a different behavior when AP runs it compared to when it runs when your login. Its not putting the icon in the bottom right corner and it adds it to the signin options but does nothing. This is my first time trying to set it up and I am using version 5.2.6.

      1. Mark DePalma Post author

        This is what GlobalProtect looks like if it is not installed with PLAP. Did you install it using the script I provided? In that script is a process that runs AFTER installation to enable PLAP (PanGPS.exe -registerplap).

        If you have done this and are still having the issue then check the ‘(Default)’ registry value under: ‘HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\PLAP Providers\{20A29589-E76A-488B-A520-63582302A285}’. Verify that the value is set to ‘PanPlapProvider’. This registry should already be set if ‘PanGPS.exe -registerplap’ was already run.

        1. lkg907

          Yes, I used InstallGlobalProtect_PLAP.ps1. I did not setup a deployment for IntuneHybridJoinHelperInstaller.ps1 as I did not think it was necessary after my results of just installing using InstallGlobalProtect_PLAP.ps1 with a fresh autopilot device that was off the network. What I do see is that the portal address is not entered for the device. I have a cisco gateway so I just logged in with that to see what happened.

          1. lkg907

            It seems this is what failed for some reason. New-ItemProperty -Path ‘HKLM:\SOFTWARE\Palo Alto Networks\GlobalProtect\PanSetup’ -Name ‘Portal’ -Value $PortalAddress -PropertyType String -Force | Out-Null

            Don’t see the portal address in the reg.

  4. kuvinod7

    Hi Mark – Great and very useful post. The only issue we have is with group polices that are not getting applied during the first time logon as we have enabled loopback replace mode. After we make a connection to VPN from the start up page and the user logs in we are seeing that specifically logon scripts and folder redirections from GPO are not getting applied. Any suggestions ?

    Thakns,
    Vinod

    1. Mark DePalma Post author

      Yes! Please take a look at my original post (https://blog.markdepalma.com/?p=763). I wrote a helper script (IntuneHybridJoinHelperInstaller.ps1) that helps resolve many GPO-related issues. Scripts *may* actually kick off after the refresh using this. Folder redirection may only kick in the second logon because of how Explorer actually applies it (I’m not 100% there).

      I’d love to hear your results after using the helper script. I’d be happy to look into enhancing it if either of those two settings still don’t work for you at first logon.

  5. sstalon

    i followed what you did, and the device status shows as “Access is denied. (0x80070005)”
    Any ideas? I did follow your original post, and than used this part so they can do username and password login.

      1. sstalon

        so i the whole restore of the laptop, and it onboards into autopilot/hybrid successfully, but i dont see the gp at login option. I check in endpoint.microsoft.com to look at the app status, and thats where it shows the access denied error msg. Not sure where i am doing it wrong.

        Like your other posting, i do have the gpo deployed to that OU, and the machine name is successfully added in that OU i have it pushed too.
        It does say its successfully deployed the Join-IntuneHybridJoinHelperInstaller as well.

      2. sstalon

        actually i just tried again this morning, now it shows it successfully pushed out the “PLAP ” version i created based on this posting. As well shows what you have in your posting, but for it to work.

        after onboarding finishes, and it goes to the login screen it still doesnt show. I had to wait i think about 15 mins, than restart the laptop and than it shows.

        Do i need to do something else to have it show right away?

        1. Mark DePalma Post author

          To really understand what is happening you’d have to look into the logs and timings. I suggest you run a new deployment, make a note of the time the deployment is done and you are the logon screen, reboot to get the VPN option to show, and then look at the PanGPS log file to see when the ‘-registerplap’ command was executed. Compare the time the command was run to the time the deployment finished and you first wound up at the logon screen.

          1. sstalon

            is there away to make it so this gets run first before any other apps? I created a profile policy to create a local admin. When i login as a local admin, and all the other intune apps look to have been pushed except the GP one, but if i reboot than it install GP app it seems

          2. Mark DePalma Post author

            I actually have a hunch that client is installing, but that PLAP provider is not active because this part of the OS has already been loaded. When you logon as local admin, do you see GlobalProtect installed and it’s just the option at the Windows logon screen missing?

          3. sstalon

            so today, i redeployed the same laptop 3 times. 2 of 3 times it doesnt even show the gp app on the login screen, when i login as local admin, and i see the other apps pushed to it except GP. If i wait long enough i will see it installed on the laptop. This whole process i dont use ESP. Not suppose to use ESP right?

          4. sstalon

            sorry forgot to mention, when it doesnt install right away, it shows as access deny when i check device install status. Do you know where i can check in intune to see what it says access deny?

          5. Mark DePalma Post author

            Do you have a screenshot of what you are seeing? That would help to pinpoint the issue.

  6. mtherrmann

    I had to manually set registry for the plap registration when installing GP 5.28. However, I’m being prompted for first set of credentials, but 2nd factor doesn’t display at login screen and then get error connecting. Any ideas?

    1. Mark DePalma Post author

      Shouldn’t have to do anything in the registry manually if you’re running ‘PanGPS.exe -registerplap’ as part of the installation.

      What exactly do you mean by 2nd factor? What type of authentication are you using for your portal and gateway?

      1. sg328

        Hi Mark,

        We are experiencing the same issue, we are prompted for the first set of credentials but then 2nd factor doesn’t appear, the pop up screen goes white. We are using DUO for 2FA.

          1. Mark DePalma Post author

            What authentication method(s) are configured on the portal? And what authentication method(s) are configured on the gateway? You should have a configuration for each one.

  7. Eric

    Hey Mark,

    Any ideas how to make pre-auth/pre-login with SAML, keep the tunnel active post-login with on-demand?

    I don’t want the tunnel always on, but if users do pre-auth/pre-login, I want the tunnel active after they log in.

    Currently it disconnects post-login and users have to reconnect.

    1. Mark DePalma Post author

      You should be able to accomplish this with the configuration this article. You just set the agent settings to on-demand, the user logs in with SAML using PLAP, and the connection should stay active post-logon. What are your agent settings?

      1. sg328

        I’ve since set the option ‘Skip AD connectivity check’ to yes and no longer receive that error, but I am now faced with a different error on device setup – Apps (0x81036502)

        I will look into gathering the logs

        1. Mark DePalma Post author

          The machine should be doing an on-prem AD join at the initial setup and then completing a hybrid join at first logon. At what point are you receiving an error? What is the full error?

          1. sg328

            I’m receiving error 0x81036502 on the ESP under device setup.
            From checking dsregcmd /status in CMD it is joining out on-prem domain but not azure AD

  8. mripra

    Mark,
    Thanks for awesome blog. I tried all the setup from this one and remain steps from part 1. I am using perlogon method.

    Only Error I am getting is at the time of app installing (under Device Setup) it says (1 of 2 Installed) and then failed cos it exceed 60 mins time out. After App fail message I continued by clicking “Continue anyways” option. Then, I can connect to GP as shown above and when I login for first time I do see the “IntuneHybridJoinHelperInstaller.ps1” created the scripts folder in C drive and runs at the first logon cos I see the pop in system notification.

    My question is why its stating the app install failed? How Can I avoid?
    Also , do you think I should keep or remove “IntuneHybridJoinHelperInstaller.ps1” under “Block device use until required apps are installed if they are assigned to the user/device” Enrollment options? atm I have 2 apps GP-PLAP and Intunehelper in that option.

    Thanks In advance!

  9. nlynch@neodyne.ie

    Hi Mark, great write up thank you so much for taking the time in jotting all this down for us.

    I hope you can help me though, im confused as to what to do with the helper and wrapper scripts you have in order to enable GP PLAP.

    Can you tell me the process? Do I just convert the GP installer to .wintuneim and add these scripts as dependencies ? Or do I upload those separately using Intune Scripts?

    Sorry if this is a very basic questions I am learning.

    Thanks again

Leave a Reply