Azure function - import module error

Sasa 31 Reputation points

HI. I'm having an error "ERROR: Failed to generate proxies for remote module 'azureAD'. The -OutputModule parameter does not resolve to a path, and a user module path cannot be found for the provided name" when running the azure function.

All was worked before and I can't remember that I have done any azure app configuration changes other then importing module in a function profile. Tried to remove that but the same results.

Any help is appreciated.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
2,578 questions
No comments
1 vote

5 answers

Sort by: Most helpful
  1. Jaroslaw Raczynski 11 Reputation points

    I had a call with MS about that issue. The MS Engineer advised to change the value in FUNCTION_EXTENSION_VERSION to After the change, the problem was solved.

    How to find it : Function App -> Configuration -> find FUNCTION_EXTENSION_VERSION and change value clicking on a pencil icon. After implemented changes, click Save

  2. Steven R 51 Reputation points

    We are also experiencing the exact same issue since last week. I started a thread on this here:

    Creating a new function app from scratch works - using the exact same code - for a couple of requests. After an undetermined number of tries, it stops working. Import-Module will always fail with the same error.

    Any suggestions on how to solve this would be much appreciated.

    No comments

  3. Dillon Silzer 33,346 Reputation points

    I believe a similar issue was explained below. You need to check your PSModulePath.


  4. MayankBargali-MSFT 49,456 Reputation points Microsoft Employee

    **Update: **

    @Sasa @vidarak @Steven R
    Apology for the inconvenience due to this issue. The workaround is to update the runtime version to by updating the FUNCTION_EXTENSION_VERSION in tha application configuration of your function app if you are running PowerShell function version 7.
    The product team will be fixing the issue in the latest runtime.

    @Sasa Thanks for reaching out. As per the error it looks like there is issue with the module azureAD. Can you please share your requirements.psd1 file and confirm if you have added the AzureAD in your requirements.psd1. For more details on Dependency management, you can refer to this document.

     Az = '1.*'  
     AzureAD = ''  

    In Az module I don't see AzureAD dependencies. In case if you have added the dependencies correctly then please share sample code so I can verify at my end.

  5. vidarak 1 Reputation point

    Having the exact same issue occur with Azure Function App timed functions on 3 separate tenants. Last successful run was on July 6th. Failed runs started on 7th. Seems like MS had made a change that introduced a bug.

    FYI: I've made a support request on our Unified Enterprise support plan about this. Will update if there are any solutions from them.