diff --git a/src/sdk/PnP.Core/Services/Core/BatchClient.cs b/src/sdk/PnP.Core/Services/Core/BatchClient.cs index ebf80fefcb..77604a2ef7 100644 --- a/src/sdk/PnP.Core/Services/Core/BatchClient.cs +++ b/src/sdk/PnP.Core/Services/Core/BatchClient.cs @@ -775,13 +775,14 @@ private Tuple BuildMicrosoftGraphBatchRequestContent(Batch batch { foreach(var key in request.ApiCall.Headers.Keys) { - if(!graphRequest.Headers.ContainsKey(key)) + string existingKey = graphRequest.Headers.Keys.FirstOrDefault(k => k.Equals(key, StringComparison.InvariantCultureIgnoreCase)); + if (string.IsNullOrWhiteSpace(existingKey)) { graphRequest.Headers.Add(key, request.ApiCall.Headers[key]); } else { - graphRequest.Headers[key] = request.ApiCall.Headers[key]; + graphRequest.Headers[existingKey] = request.ApiCall.Headers[key]; } } }