Fastest way to capture and upload the hardware hashes into Intune AutoPilot (Microsoft Device Management #MEM)

We expect the vendors to provide the Windows Autopilot hardware hashes or onboard the devices directly into our tenant. However, that is not usually the case. While the process has improved over the years, there are situation where vendors may not be able to generate the hardware hashes on a timely manner, or not at all. That is why Windows Autopilot device registration can be done within your organization by manually collecting the hardware hashes and uploading this information in a comma-separated-value (CSV) file.

STOP THEREā€¦ that process has been updated and improved, making our life much easier. Thank to a newly available option as part of the Windows10 devices, you can manually generate the hashes and automatically upload the hashes to your tenant without the need exporting it into a .CSV file.

During the OOBE (Out of the Box Experience) you also can initiate the hardware hash upload by launching a command prompt (Shift+F10 at the sign in prompt), and using the following commands.

Prerequisite: Your device needs to be connected either a wired or wireless network with internet access.

Powershell.exe 
Install-Script -name Get-WindowsAutopilotInfo -Force
Set-ExecutionPolicy Unrestricted
Get-WindowsAutoPilotInfo -Online

At this point you will be prompted to sign in, an account with the Intune Administrator role is sufficient, and the device hash will then be uploaded automatically. If MFA is enabled, you will be required to use it. (Always make sure to have MFA enabled in all your accounts)

Upon confirmation of the uploaded device hash details, run a sync in the Microsoft Endpoint Manager Admin Center and wait for your new device to appear.

Once the device is shown in your device list, and an autopilot profile is assigned, restarting the device will result in OOBE running through Windows Autopilot provisioning process.

Tools to drive your Zero Trust implementation

Today, someone said on a call that implementing a zero-trust model, was as difficult as learning a new language and did not know where to start.

PowerPoint Presentation I am trying to describe the areas and provide my peers with ideas on where to start with the basics of zero-trust. As you begin to assess your Zero Trust readiness and begin to plan on the changes to improve protection across identities, devices, applications, data, infrastructure, and networks. CIOs and IT personnel should consider these key areas to help drive the Zero Trust implementation more effectively.

  1. Strong authentication: Ensure strong multi-factor authentication and session risk detection as the backbone of your access strategy to minimize the risk of identity compromise.
  2. Policy-based adaptive access: Define acceptable access policies for your resources and enforce them with a consistent security policy engine that provides both governance and insight into variances.
  3. Micro-segmentation: Move beyond simple centralized network-based perimeter to comprehensive and distributed segmentation using software-defined micro-perimeters.
  4. Automation: Invest in automated alerting and remediation to reduce your mean time to respond (MTTR) to attacks.
  5. Intelligence and AI: Utilize cloud intelligence and all available signals to detect and respond to access anomalies in real time.
  6. Data classification and protection: Discover, classify, protect, and monitor sensitive data to minimize exposure from malicious or accidental exfiltration.

RBAC settings required to allow a non-administrator to request or initiate a JIT session

Today, I faced the challenge to grant a remote consultant temporary access to a VM in Azure.

Since, Bastion may be a cleaner way to access the service, we decided to try JIT via the Azure portal as it gives you a quick and easy access protected with MFA. I decided to AZURE AD federations and granted access to his account on his own domain and request MFA (External Access).

After giving the account permission to login to the VM the user got an error when invoking the JIT. The permission does not allow the user to request JIT. When the user clicked the connect option from Azure portal VM UI, it was showing JIT was not enabled on this particular VM. Therefore, the connection was failing. But JIT was enabled on the VM, and a subscription owner/contributor were able to see “Request Access” when clicked Connect.

I learned that one option will be to use the reader role. But that would have given extra visibility to the VM that I was not interested in exposing.

The solution was to create a custom role at the VM level and assigned the external user to the role.

The permission needed are as follows:

If you prefer to use the JSON, you may use the following:

{
    "properties": {
        "roleName": "Just In Time (JIT) Request",
        "description": "Created by Clopez. Allow non-administrator to request JIT",
        "assignableScopes": [
            "/subscriptions/bdd4aef1-176f-46b9-b150-40930ced4f32/resourceGroups/Falcon1"
        ],
        "permissions": [
            {
                "actions": [
                    "Microsoft.Security/locations/jitNetworkAccessPolicies/initiate/action",
                    "Microsoft.Security/locations/jitNetworkAccessPolicies/read",
                    "Microsoft.Security/policies/read",
                    "Microsoft.Compute/virtualMachines/read"
                ],
                "notActions": [],
                "dataActions": [],
                "notDataActions": []
            }
        ]
    }
}

The result was positive, and now the user has the options to request the JIT.