jhoneill / MsftGraph

A PowerShell module for interacting with the Microsoft Graph API for Directory, OneNote, OneDrive, Outlook, Planner, Teams and Sharepoint in Office 365 or consumer versions
MIT License
93 stars 12 forks source link

Unable to install into Azure Automation #1

Open JerryMWeeks opened 5 years ago

JerryMWeeks commented 5 years ago

When I attempt to install this into Azure Automation - using the Browse Modules - search - msftGraph , then chose install, the module goes into "installing mode" then a short while later errors

Error importing the module MsftGraph. 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.

I also tried using the "Deploy To Azure Automation" button in the PowerShell gallery, that eventually threw a longer exception:

I have had to split this error into parts to avoid giving away subscription details.

modules/MsftGraph/events/3f9f6f04-864e-47cc-a7e0-6add800ca8b1/ticks/636945512871803306", "level": "Error", "operationId": "e855b670-4864-4b5b-b71b-bc1df1d938e4", "operationName": { "value": "Microsoft.Automation/automationAccounts/modules/write", "localizedValue": "Create or Update an Azure Automation Powershell module" }

"submissionTimestamp": "2019-05-27T10:56:11.2022781Z", "subscriptionId": "a long guid here", "properties": { "statusCode": "Conflict", "statusMessage": "{\"status\":\"Failed\",\"error\":{\"code\":\"ResourceDeploymentFailure\",\"message\":\"The resource operation completed with terminal provisioning state 'Failed'.\"}}" }

I think it might be related to the default install of AzureRM modules, but as I cannot find any dependency information I am unable to contribute more.