Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Issue With OData.Feed: 'System.String[]' of the OData-Version HTTP header is invalid. Only '4.0' ...

I have recently had an issue with an OData.Feed to https://api.securitycenter.microsoft.com/api/machines which was working fine until earlier this week. Other than general patches to my machine there haven't been any changes I am aware of. I have also tried it on more than one machine and in a new power BI document to make sure there aren't any code issues. I also have other OData feeds to Microsoft and other websites that are working without any issues.

 

The code is very simple and is produced by power BI when selecting OData as the feed type, it hadn't been altered by me: 

 

Source = OData.Feed("https://api.securitycenter.microsoft.com/api/machines", null, [Implementation="2.0"])

 The error received is:

 

Error

The value 'System.String[]' of the OData-Version HTTP header is invalid. Only '4.0' is supported as values for the OData-Version header.

True

 

Details from the error are:

 

Feedback Type:
Frown (Error)

Release:
October 2022

Product Version:
2.110.805.0 (22.10) (x64)

Stack Trace:
Microsoft.Mashup.Client.UI.Shared.ExceptionResultException
at Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitFor[T](IMessageChannel channel)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.WaitFor(Func`1 condition, Boolean disposing)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.get_SmallValue()
at Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_SmallValue()
at Microsoft.Mashup.Host.Document.Analysis.PackageDocumentAnalysisInfo.PackagePartitionAnalysisInfo.SetPreviewValue(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled)

PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.110.805.0","ModuleName":"","Component":"Microsoft.Mashup.Evaluator.EvaluationHost","Error":"Microsoft.Mashup.Client.UI.Shared.ExceptionResultException","MethodDef":"OnException","ErrorOffset":""}

OS Version:
Microsoft Windows NT 10.0.19044.0 (x64 en-GB)

CLR Version:
4.8 or later [Release Number = 528372]

Peak Virtual Memory:
70.1 GB

Private Memory:
558 MB

Peak Working Set:
827 MB

IE Version:
11.789.19041.0

Workbook Package Info:
1* - en-GB, Query Groups: 0, fastCombine: Disabled, runBackgroundAnalysis: False.

Telemetry Enabled:
True

Model Default Mode:
Empty

Model Version:
PowerBI_V1

Enabled Preview Features:
PBI_enableWebView2
PBI_sparklines

Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_azureMapVisual
PBI_compositeModelsOverAS
PBI_b2bExternalDatasetSharing
PBI_enhancedTooltips
PQ_WebView2Connector
PBI_scorecardVisual
PBI_NlToDax
PBI_fieldParametersSuperSwitch
PBI_horizontalFusion
PBI_relationshipEditPane

Disabled DirectQuery Options:
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

DPI Scale:
150%

Supported Services:
Power BI

 

Thanks in advance for any help offered.

Status: Investigating

Hi @red13x ,

 

No further conclusions can be drawn in my case.

Based on the above information, if you are a Power BI Pro licensee, you can create a support ticket for free and a dedicated Microsoft engineer will come to solve the problem for you.
It would be great if you continue to share in this issue to help others with similar problems after you know the root cause or solution.

 

The link of Power BI Support: Support | Microsoft Power BI

For how to create a support ticket, please refer to How to create a support ticket in Power BI - Microsoft Power BI Community

 

Best Regards,
Community Support Team _ Caitlyn

Comments
zeroSPace33
Frequent Visitor

I'm having the same issue with Power BI and Security Center. Seems new this week. I'd like to know if anyone else has the issue or knows how to fix it. If I hear anything, I'll post it here.

 

Thank you!

gooms
New Member

Same problem here. 

ridbo123
New Member

Same issue here 😞

v-xiaoyan-msft
Community Support
Status changed to: Investigating

Hi @red13x ,

 

Thank you for your feedback, but for some uncertain reason I have not been able to reproduce this issue, we have received this feedback and will continue to investigate this issue, I will give you feedback here once there is any progress.

 

Best Regards,
Community Support Team _ Caitlyn

red13x
Regular Visitor

One thing to add that may help is last week I tried adding a filter to the URL string and it started working, but on next refresh it stopped working. Today I tried a different filter string combo, it didn't work, I tried again, no, then again, no, and then on my 5th or 6th attempt I tried refreshing without any filter and it started working. 10 minutes or so later, after another refresh it has stopped working again. I don't think the filter itself is relevant as I have made it work with and without a filter, only that by changing the string each time I am forcing a data refresh.

 

I guess all this says is that the issue might be intermittent, with a huge amount of attempts not working and just a few allowing me to pull data back with the API. I have queries targetting the following URLs and these are all working when I refresh the data:

 

The error, for me at least, is only occuring on this URL: https://api.securitycenter.microsoft.com/api/machines so perhaps the issue is at the API side rather than Power BI? I am not 100% sure. 

Anonymous
Not applicable

Experiencing the same issue.
Seems intermittent.
Tried making changes to the Query, removing and/or adding ODataVersion and Implementation versions, working only sometimes nothing consistent.

JCESTRA
New Member

I am also having the same issue.

MichaelRasmus
New Member

I am experiencing the exacty same issue with:

"The value 'System.String[]' of the OData-Version HTTP header is invalid. Only '4.0' is supported as values for the OData-Version header."

 

For the following API: https://api.security.microsoft.com/api/  and https://api.securitycenter.microsoft.com/api/

 

Query = "Machines",

Source = OData.Feed("https://api.securitycenter.microsoft.com/api/" & Query, null, [Implementation="2.0", MoreColumns=true])

It worked just fine last time I used it. Though it does seem that monthly something is breaking in these API's and its getting infuriating..


EDIT: I found a workaround. In my query for lets say Machines, I changed it to "Machine", ran it (it fails), then back to 'Machines'.. Did that a few times and it worked once. Its not really a good solution but confirms the intermittent errors. 

EDIT 2: Scratch that. It only works for preview, not for the actual report. 

MichaelRasmus
New Member

Full error I receive:

Unexpected error: The value 'System.String[]' of the OData-Version HTTP header is invalid. Only '4.0' is supported as values for the OData-Version header.
Details:
Microsoft.Mashup.Evaluator.Interface.ErrorException: The value 'System.String[]' of the OData-Version HTTP header is invalid. Only '4.0' is supported as values for the OData-Version header. ---> Microsoft.OData.ODataException: The value 'System.String[]' of the OData-Version HTTP header is invalid. Only '4.0' is supported as values for the OData-Version header. ---> Microsoft.OData.ODataException: The value 'System.String[]' of the OData-Version HTTP header is invalid. Only '4.0' is supported as values for the OData-Version header.
at Microsoft.OData.ODataUtils.StringToODataVersion(String version)
at Microsoft.OData.ODataMessageReader..ctor(IODataResponseMessage responseMessage, ODataMessageReaderSettings settings, IEdmModel model)
at Microsoft.Mashup.Engine1.Library.OData.V4_7.Reader.ODataReaderWithResponse.CreateFromHttpResponseData(IEngineHost engineHost, HttpResponseData httpResponseData, Uri requestUri, String resourceKind, Boolean isResourceSet, IEdmModel model)
at Microsoft.Mashup.Engine1.Library.OData.V4_7.Reader.ODataHttpResponseReader.ToResourceReader(Boolean isResourceSet)
at Microsoft.Mashup.Engine1.Library.OData.V4_7.Reader.ODataReaderEnumerable.GetReaderEnumerator(GetReader getReader)
at Microsoft.Mashup.Engine1.Language.Query.SelectRowsQuery.SelectRowsEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.SelectRowsQuery.SelectRowsEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.SelectRowsQuery.SelectRowsEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.AddColumnsQuery.AddColumnsDirectCtorsEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.ProjectColumnsQuery.SelectColumnsEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.ProjectColumnsQuery.SelectColumnsEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.AddColumnsQuery.AddColumnsDirectCtorsEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.AddColumnsQuery.AddColumnsDirectCtorsEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.AddColumnsQuery.AddColumnsDirectCtorsEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.ProjectColumnsQuery.SelectColumnsEnumerable.GetEnumerator()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at Microsoft.Internal.IEnumerableExtensions.MaxK[T](IEnumerable`1 list, Int32 count, IComparer`1 comparer)
at Microsoft.Mashup.Engine1.Language.Query.SortQuery.SortEnumerable.Sort(IEnumerable`1 values, IComparer`1 comparer, Int64 takeCount)
at Microsoft.Mashup.Engine1.Language.Query.SortQuery.SortEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.AddColumnsQuery.AddColumnsDirectCtorsEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.ProjectColumnsQuery.SelectColumnsEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.ProjectColumnsQuery.SelectColumnsEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.QueryTableValue.GetEnumerator()
at Microsoft.Mashup.Engine1.Runtime.TableValue.Microsoft.Mashup.Engine.Interface.ITableValue.GetEnumerator()
at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.ValuePreviewValueSource.TableValuePreviewValueSource.SerializeRows(Int32 count)
at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator.ValuePreviewValueSource.TableValuePreviewValueSource.get_SmallValue()
at Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_SmallValue()
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.<>c__DisplayClass0_0.<RunStub>b__0()
at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(String entryName, IEngineHost engineHost, IMessageChannel channel, Action action)
--- End of inner exception stack trace ---
at Microsoft.Mashup.Evaluator.EvaluationHost.<>c__DisplayClass17_0.<TryReportException>b__1()
at Microsoft.Mashup.Common.SafeExceptions.IgnoreSafeExceptions(IEngineHost host, IHostTrace trace, Action action)
at Microsoft.Mashup.Evaluator.EvaluationHost.TryReportException(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Exception exception)
at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(String entryName, IEngineHost engineHost, IMessageChannel channel, Action action)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.<>c__DisplayClass12_1`1.<OnBeginGetResult>b__0()
at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetResult[T](IMessageChannel channel, BeginGetResultMessage message, Action`1 action)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetPreviewValueSource(IMessageChannel channel, BeginGetPreviewValueSourceMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.OnMessageWithUnknownChannel(IMessageChannel baseChannel, MessageWithUnknownChannel messageWithUnknownChannel)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.EvaluationHost.Run()
at Microsoft.Mashup.Container.EvaluationContainerMain.Run(Object args)
at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass9_0.<CreateAction>b__0(Object o)
at Microsoft.Mashup.Container.EvaluationContainerMain.SafeRun(String[] args)
at Microsoft.Mashup.Container.EvaluationContainerMain.Main(String[] args)
--- End of inner exception stack trace ---
at Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitFor[T](IMessageChannel channel)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.WaitFor(Func`1 condition, Boolean disposing)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.get_SmallValue()
at Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_SmallValue()
at Microsoft.Mashup.Host.Document.Analysis.PackageDocumentAnalysisInfo.PackagePartitionAnalysisInfo.SetPreviewValue(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled)

RichardD2
New Member

Based on Michael's stack trace, I suspect the OData version on the server has been updated, and PowerBI doesn't support the new version.

 

At a guess, it may have been updated on some nodes but not others, which may explain why the error is intermittent.