diff --git a/src/sdk/PnP.Core/Model/Base/BaseDataModel.cs b/src/sdk/PnP.Core/Model/Base/BaseDataModel.cs index 474d64be95..58d60301c4 100644 --- a/src/sdk/PnP.Core/Model/Base/BaseDataModel.cs +++ b/src/sdk/PnP.Core/Model/Base/BaseDataModel.cs @@ -209,13 +209,17 @@ private void ConfigureApiTypeAndRequest(ApiRequest request, out ApiType apiType, switch (request.Type) { case ApiRequestType.SPORest: - { - // Ensure external API requests keep using odata=verbose for SharePoint REST requests (see #655) + { if (request.Headers == null) { request.Headers = new Dictionary(); } - request.Headers["Accept"] = "application/json;odata=verbose"; + + // Ensure external API requests keep using odata=verbose for SharePoint REST requests unless an Accept header has explicitly been provided (see #655) + if (!request.Headers.ContainsKey("Accept")) + { + request.Headers.Add("Accept", "application/json;odata=verbose"); + } if (apiRequest != null && !apiRequest.StartsWith("https://", StringComparison.InvariantCultureIgnoreCase)) {