I had the following in my requirements.psd1
of a Function App.
1 2 3 4 5 6 7 8 9 10 11 |
# This file enables modules to be automatically managed by the Functions service. # See https://aka.ms/functionsmanageddependency for additional information. # @{ # For latest supported version, go to 'https://www.powershellgallery.com/packages/Az'. # To use the Az module in your function app, please uncomment the line below. 'Az' = '6.*'; 'Microsoft.Graph.Authentication' = '1.*' } # **IMPORTANT** Restart the Function app after any changes. |
Standard stuff except for the downloading of Microsoft.Graph.Authentication
.
That didn’t work for some reason. It tried to download and then gave up after a few minutes?
According to the docs the modules should be at the following path:
I couldn’t find anything there however.
Weirdly though when I ran the Function again it worked without downloading any modules. That didn’t make sense so I added a Get-Module
in the Function code to see the modules and sure enough it was there:
It’s a different path though with timestamps. Googling on that bought me to a blog post where someone else noticed the same. That blog post also has instructions on adding custom modules; similar to the one from Microsoft. If I run into the module issues again maybe I’ll just upload it manually and be done.
Update: Found another blog post with some useful modules info.