"The given URL neither points to an OData service or a feed" error when retrieving data from a Dynamics CRM 2013 OData endpoint
This article helps you resolve the problem that occurs when you attempt to connect Power Query for Excel to Dynamics CRM 2013 Service Pack 1 On Premises using Claims-Based Authentication.
Applies to: Microsoft Dynamics CRM 2013 Service Pack 1
Original KB number: 3133137
When attempting to connect Power Query for Excel to Dynamics CRM 2013 Service Pack 1 On Premises using Claims-Based Authentication (AD FS), the following error occurs when specifying the correct OData feed URL:
Unable to Connect
We encountered an error while trying to connect.
Details: "OData: The given URL neither points to an OData service or a feed:
https://<adfs FQDN>/adfs/ls/wia?wa=wsignin1.0&wtrealm=https://<CRMaddress>/&wctx=rm=1&id=cf10e7d7-f0c8-4685-b357-e60206c80d44&ru=%252fcontoso%252fXRMServices%252f2011%252fOrganizationData.svc%252f&wct=2015-12-30T11:22:54Z&wauth=urn:federation:authentication:windows'." ..."
This is a by design behavior of the Power Query for Excel when trying to retrieve data from a Dynamics CRM On Premises Organization OData service, when it is behind an AD FS and the OAuth authentication method is not yet configured on the Dynamics CRM and AD FS deployment.
The add-in needs OAuth2/AD FS 3.0 to be configured over the CRM 2013 On Premises deployment to allow the Organization account authentication method to allow the sign-in on the AD FS, and to add it in the Approved AD FS Authentication Service list during the retrieving of the OData service.
Example of the referenced working scenario:
- AD FS 3.0
- CRM 2013 SP1 claims based enabled
- Client machine with Excel 2013 and Microsoft Power Query for Excel 2.27.4163.242 onboard with Internet connectivity
Step by step on how to configure the environment:
Enable Form Based Authentication on AD FS 3.0
Log on to the AD FS server as an administrator.
Open the AD FS management wizard.
Click Authentication Policies > Primary Authentication > Global Settings > Authentication Methods > Edit.
Click (check) Form Based Authentication on the Intranet tab.
Restart the AD FS service
Configure/Allow the OAuth on Dynamics CRM deployment
Log on to the Microsoft Dynamics CRM server as an administrator.
In a Windows PowerShell console window, run the following script.
Add-PSSnapin Microsoft.Crm.PowerShell $fedurl = Get-CrmSetting -SettingType ClaimsSettings $fedurl.FederationProviderType = 1 Set-CrmSetting $fedurl
Run an IISReset command
Register the client application (Excel with Power Query add-in onboard)
Log on to the AD FS server as administrator.
In a PowerShell window, execute the following command.
Add-AdfsClient -ClientId "a672d62c-fc7b-4e81-a576-e60dc46e951d" -Name "Microsoft Power BI" -RedirectUri @("https://de-users-preview.sqlazurelabs.com/account/reply/", "https://preview.powerbi.com/views/oauthredirect.html") -Description "ADFS OAuth 2.0 client for Microsoft Power BI"
Configure Power Query for Excel
On the client machine, Open Excel and open/create a workbook.
Click on Power Query, then in the Get External Data section of the ribbon, click on From other sources and then choose From OData feed.
Specify the Dynamics CRM Organization OData URL and click OK. (internal or external URL depending on your scenario)
Click On Organizational account as the authentication method and then click on Sign in.
When prompted, click Allow to confirm that you trust the AD FS as your identity provider for your OData feed.
During this phase, the client machine with the Excel and Power Query onboard, needs Internet connectivity to reach the PowerBI authentication endpoint hosted in Azure @(
The AD FS end point will be added to the Approved AD FS Authentication Service list, to access the list click on Power Query, then in the Settings section of the ribbon, click on Options and then click on Security.
Click Connect and you will be presented the entity list as usual to start working with Power Query.