Deploying with Microsoft.Graph sdk to Azure Function App Isolated Worker Net 8.0 causing InternalServerError from host runtime
I am trying to debug this issue where the inclusion of the Microsoft.Graph SDK is causing the azure function app host run time to fail.
Running the function app in debug mode locally I have no issues using Microsoft Graph to access the data I need. It is only after deploying the app that I receive an error in Azure:
I am using Azure Identity alongside Microsoft.Graph to access Sharepoint through ClientSecretCredentials. Only one class/project has these dependencies:
<PackageReference Include="Azure.Identity" Version="1.13.1" />
<PackageReference Include="Microsoft.Graph" Version="5.67.0" />
SharepointClient.cs
public class SharepointClient
{
private GraphServiceClient _graphClient;
public SharepointClient(string tenantId, string clientId, string clientSecret)
{
var clientSecretCredential = new ClientSecretCredential(tenantId, clientId, clientSecret);
_graphClient = new GraphServiceClient(clientSecretCredential);
}
/ * ... */
}
I am not using Dependency Injection yet, I have only installed the package and receive this error after deploying.