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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
LewisH
Helper II
Helper II

OData

We are trying to implement the use of Power BI Dashboards within or business. I am connecting Power Bi to our Nav Database via an OData connection. The connection works fine and data comes through as expected, no worries here. However If I log into Navision or have it open (Have a connection) i get the following Error When I try and do anything essentially, i.e refresh, Modify Queries etc.

 

DataSource.Error: Microsoft.Mashup.Engine1.Library.Resources.HttpResource: Request failed: OData Version: 3 and 4, Error: The remote server returned an error: (400) Bad Request. (Bad Request) OData Version: 4, Error: The remote server returned an error: (400) Bad Request. (Bad Request) OData Version: 3, Error: The remote server returned an error: (400) Bad Request. (Bad Request) Details: DataSourceKind=OData DataSourcePath= (This would be my OData Path)

 

Any ideas will be appreciated.

3 REPLIES 3
hugoberry
Responsive Resident
Responsive Resident

Something from MSDN, might be relevant for your case

https://msdn.microsoft.com/en-us/library/mt634540(v=nav.90).aspx

 

Credential Lifetime

After having prompted for Basic credentials, the credential are persisted by application and used for as long as they are valid in Microsoft Dynamics NAV. However, the picture is more complicated for OAuth because the security tokens that are used for authentication have a limited lifetime. The code to obtain OAuth credentials was as follows:

 

The AuthenticationResult actually contains two tokens:

 

The accessToken is the one that is actually used when the client application calls the web service. The access token is relatively short-lived (one hour, subject to change), and when it expires, the client application needs a new access token.

The refreshToken lives much longer (6 months, subject to change), and it can be used to get a new access token:

 

On this forum I've seen this problem being resolved when you start refreshing your NAV datasest via the gateway

Thank you for the reply, I've looked into this and don't think this is the casuse. The connection is always fine if no one is on the nav service, it is only until someone logs in it will error. Refreshing the gateway every time this occurs isn't really a viable option. 

v-yuezhe-msft
Employee
Employee

Hi @LewisH,

Do you use Power BI Desktop or Power BI Service to connect to Nav?  Have you checked the steps in this article?

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors