Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.Graph.DeviceManagement.Actions Module Requirements Incompatible with 2.26.0 #3182

Open
uta-sheppardpj opened this issue Feb 25, 2025 · 5 comments
Labels

Comments

@uta-sheppardpj
Copy link

Describe the bug

The RequiredModules for the Microsoft.Graph.DeviceManagement.Actions .psd1 file is still requiring version 2.25.0 for Microsoft.Graph.Authentication after the latest release of version 2.26.0. Furthermore, there are no updates to version 2.26.0 for the Microsoft.Graph.DeviceManagement.Actions module, unlike other adjacent modules for DeviceManagement.

Expected behavior

The Microsoft.Graph.DeviceManagement.Actions module should be compatible with the latest version of the Microsoft.Graph.Authentication module (2.26.0) instead of requiring an older version (2.25.0).

How to reproduce

  1. Install the latest Microsoft.Graph.Authentication and Microsoft.Graph.DeviceManagement.Actions modules
  2. Remove any previous module versions
  3. Run Import-Module -Name "Microsoft.Graph.DeviceManagement.Actions"

SDK Version

2.26.0

Latest version known to work for scenario above?

2.25.0

Known Workarounds

Keep older versions of the Authentication module

Debug output

Click to expand log
Import-Module : The required module 'Microsoft.Graph.Authentication' is not loaded. Load the module or remove the module from 'RequiredModules' in the file 'C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.DeviceManagement.Actions\2.25.0\Microsoft.Graph.DeviceManagement.Actions.psd1'.
At line:1 char:1
Import-Module -Name "Microsoft.Graph.DeviceManagement.Actions"
CategoryInfo          : ResourceUnavailable: (C:\Program File...nt.Actions.psd1:String) [Import-Module], Missing MemberException
FullyQualifiedErrorId : Modules_InvalidManifest,Microsoft.PowerShell.Commands.ImportModuleCommand

Configuration

  • OS: Windows 11, 24H2
  • Architecture: 64-bit
  • PowerShell Version: 5.1.26100.2200

Other information

No response

@uta-sheppardpj uta-sheppardpj added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Feb 25, 2025
@timayabi2020
Copy link
Contributor

Hi @uta-sheppardpj I wasn't able to reproduce your issue. However, I think you are experiencing module conflicts. Please uninstall all graph versions, manually delete module folders from the module installation directory and run
Install-Module -Name Microsoft.Graph -Repository PsGallery -Force -AllowClobber.

Image

@timayabi2020 timayabi2020 added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Feb 26, 2025
@KazimierzSyncron
Copy link

I have same issue, 2.26 and 2.26.1 versions. Steps to reproduce:

  1. Delete every Microsoft.Graph* folder in C:\Program Files\PowerShell\Modules
  2. Start new elevated pwsh (7.5) session and run install-module -name Microsoft.Graph -scope allusers -force -allowclobber -verbose
  3. Microsoft.Graph.DeviceManagement.Actions is not installed and does not appear anywhere in the log
  4. I execute install-module -name Microsoft.Graph.DeviceManagement.Actions -scope allusers -force -allowclobber -verbose
  5. Version 2.25.0 is installed VERBOSE: Performing the operation "Install-Module" on target "Version '2.25.0' of module 'Microsoft.Graph.DeviceManagement.Actions'".
  6. I attempt to install 2.26.1: install-module -name Microsoft.Graph.DeviceManagement.Actions -scope allusers -force -allowclobber -verbose -RequiredVersion 2.26.1 -Repository PSGallery
  7. Not found Install-Package: No match was found for the specified search criteria and module name 'Microsoft.Graph.DeviceManagement.Actions'.

@AmirTerani
Copy link

We encountered the same issue. We originally needed the Microsoft.Graph.DeviceManagement.Actions module for its Sync-MgDeviceManagementManagedDevice cmdlet, which was unavailable in its parent module, Microsoft.Graph.DeviceManagement v2.25.0. However, it is now included in Microsoft.Graph.DeviceManagement v2.26.0, meaning we technically no longer need Microsoft.Graph.DeviceManagement.Actions. That said, this does not prevent our current automation scripts from failing when attempting to load the module. Additionally, not all of its commands appear to have been moved over yet, so these still need to be addressed.

@uta-sheppardpj
Copy link
Author

Hi @uta-sheppardpj I wasn't able to reproduce your issue. However, I think you are experiencing module conflicts. Please uninstall all graph versions, manually delete module folders from the module installation directory and run Install-Module -Name Microsoft.Graph -Repository PsGallery -Force -AllowClobber.

Image

Our script automation ensures that previous versions are uninstalled and removed from the device, and this issue persists even after reboot. I have not yet confirmed if this issue persists in version 2.26.1, but if this module is no longer being updated, there should be mention of such on the associated Learn article.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Feb 26, 2025
@AmirTerani
Copy link

AmirTerani commented Feb 26, 2025

@timayabi2020 The following code used to work without the -AllowClobber switch on a fresh device with no previously installed modules:

Install-Module Microsoft.Graph.DeviceManagement -Scope AllUsers -Force -Verbose
Install-Module Microsoft.Graph.DeviceManagement.Actions -Scope AllUsers -Force -Verbose

However, it is now failing at the Install-Module Microsoft.Graph.DeviceManagement.Actions command because only v2.25.0 is available, which attempts to overwrite the common commands that are now included in Microsoft.Graph.DeviceManagement v2.26.1, installed just before it.

Image

Hi @uta-sheppardpj I wasn't able to reproduce your issue. However, I think you are experiencing module conflicts. Please uninstall all graph versions, manually delete module folders from the module installation directory and run Install-Module -Name Microsoft.Graph -Repository PsGallery -Force -AllowClobber.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants