ODataUtils icon indicating copy to clipboard operation
ODataUtils copied to clipboard

Export-OdataEndpointProxy Fails Against SharePoint

Open JamieSee opened this issue 6 years ago • 2 comments

Executing the following command against SharePoint 2013 or 2016 produces the error output below despite a fiddler trace clearly showing the metdata being delivered:

Export-ODataEndpointProxy -Uri 'https://SharePointSite/_api' -OutputModule '.\SharePointOData' -Credential $psCredential -Verbose -Force

VERBOSE: Performing the operation "Export-ODataEndpointProxy" on target "https://SharePointSite/_api". VERBOSE: The source code was already compiled and loaded. VERBOSE: Reading metadata from uri https://SharePointSite/_api/$metadata. VERBOSE: GET https://SharePointSite/_api/$metadata with 0-byte payload VERBOSE: received -byte response of content type application/xml VERBOSE: Parsing metadata... Export-ODataEndpointProxy : Failed to process metadata specified at URI 'https://SharePointSite/_api'. No output will be written. At line:1 char:1 + Export-ODataEndpointProxy -Uri https://SharePointSite/_api -Out ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (https://SharePointSite/_api:String) [Export-ODataEndpointProxy], InvalidOperationException + FullyQualifiedErrorId : ODataEndpointProxyInvalidInput,Export-ODataEndpointProxy

Fiddler Summary:

Number Result Protocol Host URL Body Caching Content-Type Process Comments Custom
763 200 HTTPS SharePointSite /_api/$metadata 731,691 private, max-age=0; Expires: Thu, 21 Mar 2019 20:24:21 GMT application/xml;charset=utf-8 pwsh:3740

JamieSee avatar Apr 05 '19 20:04 JamieSee