For the installation of the MacOS remote worker with Intune follow the following steps.
Download the bash installation script from here.
Edit the script and add your secret and the desired input arguments (more information here).
On Intune Select Devices > Scripts > Add > macOS.
In Basics, enter the following properties, and select Next:
Name: Enter a name for the shell script.
Description: Enter a description for the shell script. This setting is optional, but recommended.
In Script settings, enter the following properties, and select Next:
Upload script: Browse to the shell script.
Run script as signed-in user: Select Yes to run the script with the user's credentials on the device. Choose No (default) to run the script as the root user.
Hide script notifications on devices: By default, script notifications are shown for each script that is run. End users see a IT is configuring your computer notification from Intune on macOS devices.
Script frequency: Select how often the script is to be run. Choose Not configured (default) to run a script only once.
Max number of times to retry if script fails: Select how many times the script should be run if it returns a non-zero exit code (zero meaning success). Choose Not configured (default) to not retry when a script fails.
Select Assignments > Select groups to include. An existing list of Azure AD groups is shown. Select one or more user or device groups that are to receive the script. Choose Select. The groups you choose are shown in the list, and will receive your script policy.
In Review + add, a summary is shown of the settings you configured. Select Add to save the script. When you select Add, the script policy is deployed to the groups you chose.
The script you created now appears in the list of scripts.