AzureAD / MSAL.PS

MIT License
159 stars 29 forks source link

Importing from Modules Gallery in Automation fails with message :While importing the module, an error occurred while processing the module content. #37

Closed hakonKortvedt closed 2 years ago

hakonKortvedt commented 2 years ago

Error importing the module MSAL.PS. Import failed with the following error: Orchestrator.Shared.AsyncModuleImport.ModuleImportException: While importing the module, an error occurred while processing the module content. Internal error message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.. at Orchestrator.Activities.SetModuleVersion.ExecuteInternal(CodeActivityContext context, String moduleName, ModuleLanguage moduleLanguage, String pythonModuleVersion, String modulePath, Guid accountId, Guid moduleVersionId, Int64 moduleContentByteSize, String storageUri, Int32 moduleVersion) at Orchestrator.Activities.SetModuleVersion.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

sandytsang commented 2 years ago

Same issues here, tested in two tenants. The older version of MSAL.PS module import works, but the newest version doesn't

andersjulton commented 2 years ago

Can confirm this. Manually importing it did not work either.

sandytsang commented 2 years ago

I needed the module in my Azure Automation, so I ran this to save the older MSAL.PS module, then zip it, and import this older version to Azure Automation. The new version doesn't work. Save-Module -Name MSAL.PS -MaximumVersion 4.21.0.1 C:\Temp

andersjulton commented 2 years ago

I needed the module in my Azure Automation, so I ran this to save the older MSAL.PS module, then zip it, and import this older version to Azure Automation. The new version doesn't work. Save-Module -Name MSAL.PS -MaximumVersion 4.21.0.1 C:\Temp

Thanks @sandytsang, that worked for me.

JankeSkanke commented 2 years ago

Same issue here. There are other modules having dependencies on MSAL.PS as well that fails because of the this same issue. Importing from Azure Automation or clicking "Deploy to Azure Automation" in PSGallery gives the same error inside Azure Automation on the latest version. image This is the output from the deployment direct from PSGallery: image

jazuntee commented 2 years ago

Thanks for reporting this. I will take a look. You can also download preview releases here: https://github.com/AzureAD/MSAL.PS/releases

jazuntee commented 2 years ago

The bug should be fixed in the latest release. Thanks! https://github.com/AzureAD/MSAL.PS/releases/tag/v4.36.1.1