Check your storage quota. If your running Consumption plan, installing Microsoft.Graph
may be too large and you may not have enough disk space. You can change your plan to a Premium plan but you can't scale down to a dedicated plan if that's not option. Otherwise, you can recreate the function app with and associate to a dedicated app service plan to the SKU you want. If you don't want to go down that route, adjust your requirements.psd1
to include only the modules you need, rather than installing everything.
As far as why uploading the module directly to the function app; it could be that requirements.psd1 saves module data to a temporary storage which is considerably smaller (especially on a Consumption plan). I've reached out the product group for more clarity on that premise and awaiting a response.
EDIT 2024 Apr 23
Reducing the number modules being installed to only what you need is the appropriate action. Module dependencies get downloaded to a temp folder which varies in size based on SKU. Once downloaded, the modules get extracted to ModuleDependenices
which is mapped to the function's storage account. The Microsoft.Graph
modules is ~890MB so based on SKU, you could run into space limitation issues. See https://github.com/Azure/azure-functions-powershell-worker/blob/dev/docs/designs/PowerShell-AzF-Overall-Design.md#problem for more details.