Skip to content

Install Microsoft.Graph module in Azure Automation - fails #465

Closed

Description

This might be more of a future feature request but I've been trying to install Microsoft.Graph into Azure Automation and getting the following:

Import module failed
Microsoft.Graph
Error importing the module Microsoft.Graph. Import failed with the following error: Orchestrator.Shared.AsyncModuleImport.ModuleImportException: An error occurred during module validation. When importing the module to an internal PowerShell session, it was not able to be loaded by PowerShell. There is likely an issue with the contents of the module that results in PowerShell's not being able to load it. Please verify that the module imports successfully in a local PowerShell session, correct any issues, and then try importing again.

Installed by selecting Deploy to Azure Automation in the PowerShell Gallery
https://www.powershellgallery.com/packages/Microsoft.Graph/1.1.0

It seems to start installing and takes about 10 minutes installing the related modules i.e. Microsoft.Graph.Applications then fails on Microsoft.Graph at the end with the error message above. I wonder due to the MS Graph modules collection being about 900MB whether it times out?

I was unable to import Microsoft.Graph from the Azure Automation modules gallery either by selecting Import on the Microsoft.Graph module.

Anyone had any success using Microsoft.Graph in Azure Automation?

Activity

  1. changed the title [-]Allow install from Module gallery in Azure Automation[/-] [+]Install Microsoft.graph module in Azure Automation - fails[/+] on Nov 16, 2020
  2. changed the title [-]Install Microsoft.graph module in Azure Automation - fails[/-] [+]Install Microsoft.Graph module in Azure Automation - fails[/+] on Nov 16, 2020
  3. peombwa commented on Nov 18, 2020

    @peombwa
    Member

    The roll-up/meta-module (Microsoft.Graph) doesn't support Azure Automation since it does not export any command. You should instead only import the service modules you are interested individually. A full list of all service modules can be found here https://github.com/microsoftgraph/msgraph-sdk-powershell/wiki/MS-Graph-PowerShell-Modules#service-modules.

    Note to self: We should add AzureAutomationNotSupported tag in PSData to disable the Deploy to Azure Automation button for Microsoft.Graph meta-module.

  4. added this to the 1.2.0 milestone on Nov 18, 2020
  5. LeonArmston commented on Nov 18, 2020

    @LeonArmston
    Author

    The roll-up/meta-module (Microsoft.Graph) doesn't support Azure Automation since it does not export any command. You should instead only import the service modules you are interested individually. A full list of all service modules can be found here https://github.com/microsoftgraph/msgraph-sdk-powershell/wiki/MS-Graph-PowerShell-Modules#service-modules.

    Note to self: We should add AzureAutomationNotSupported tag in PSData to disable the Deploy to Azure Automation button for Microsoft.Graph meta-module.

    Thanks Peter

    I will look into just using the service modules I require individually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Bug: Documentationenhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions