Skip to content

🪲[Bug]: RequiredModule is not installed #291

@hjorslev

Description

Describe the bug

https://github.com/hjorslev/IntuneOperator/actions/runs/22925515792

The above workflow fails on MacOS, probably because the module Microsoft.Graph.Authentication is not loaded (though it works fine on Linux/Windows).

In order to resolve this I have attempted to add a required module to https://github.com/hjorslev/IntuneOperator/blob/initial/src/manifest.psd1. However, when the module is build the required module is not present in the module manifest.

Version information

PSModule/Process-PSModule/.github/workflows/workflow.yml@60bdf8a5a4c92c53fcf2a8d23f7d5f5c93e6864e # v5.4.3

To reproduce

I have updated the manifest in src/manifest.psd1 and attempted to populated the RequireModules section.

Code snippet

@{
    Author            = 'Frederik Hjorslev Nylander'
    Copyright         = '(c) 2026 Frederik Hjorslev Nylander. All rights reserved.'
    Description       = 'A PowerShell module for managing and enhancing Microsoft Intune.'
    PowerShellVersion = '7.4'
    RequiredModules   = @(
        @{ ModuleName = 'Microsoft.Graph.Authentication'; ModuleVersion = '2.28.0' }
    )
}

I would expect that the above RequiredModules section would be present in the builded version of manifest, however, it is not:

@{
    RootModule            = 'IntuneOperator.psm1'
    ModuleVersion         = '999.0.0'
    CompatiblePSEditions  = @(
        'Core'
        'Desktop'
    )
    GUID                  = '51ea3dd6-6e01-423a-ad25-101f46f0580f'
    Author                = 'Frederik Hjorslev Nylander'
    CompanyName           = 'hjorslev'
    Copyright             = '(c) 2026 Frederik Hjorslev Nylander. All rights reserved.'
    Description           = 'A PowerShell module for managing and enhancing Microsoft Intune.'
    PowerShellVersion     = '5.1'
    ProcessorArchitecture = 'None'
    TypesToProcess        = @()
    FormatsToProcess      = @()
    FunctionsToExport     = @(
        'Get-IntuneDeviceLogin'
    )
    CmdletsToExport       = @()
    VariablesToExport     = @()
    AliasesToExport       = @()
    ModuleList            = @()
    FileList              = @(
        'IntuneOperator.psm1'
        'README.md'
    )
    PrivateData           = @{
        PSData = @{
            Tags       = @(
                'Linux'
                'MacOS'
                'PSEdition_Core'
                'PSEdition_Desktop'
                'Windows'
            )
            LicenseUri = 'https://github.com/hjorslev/IntuneOperator/blob/main/LICENSE'
            ProjectUri = 'https://github.com/hjorslev/IntuneOperator'
            IconUri    = 'https://v-raw-githubusercontent-com.adclosenn.dev/hjorslev/IntuneOperator/main/icon/icon.png'
        }
    }
}

Relevant output

As the manifest is not updated with the RequiredModules the Import-Module job does not find any module:

VERBOSE:  - Manifest file path: [outputs/module/IntuneOperator/IntuneOperator.psd1]
Resolving dependencies
  Resolving dependencies
   - Reading [outputs/module/IntuneOperator/IntuneOperator.psd1]
   - Found [0] module(s) to install
   - Resolving dependencies - Done
Importing module
  VERBOSE: Loading module from path '/Users/runner/.local/share/powershell/Modules/IntuneOperator/999.0.0/IntuneOperator.psd1'.
  VERBOSE: Loading module from path '/Users/runner/.local/share/powershell/Modules/IntuneOperator/999.0.0/IntuneOperator.psm1'.
  VERBOSE: Importing function 'Get-IntuneDeviceLogin'.
WARNING: /Users/runner/.local/share/powershell/Modules/IntuneOperator/999.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions