This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Hi all,
I'm using a Power BI Pro licence. I'm trying to refresh the semantic models for the Business Central Power BI Native Apps and I get an error after sometime telling me the credentials for the D365BusinessCentral Source are invlaid.
Tried looking here for any issues but I can't work out where to turn next. Fairly new users of BI so any help would be much appreciated. @PowerBI
Thanks
Solved! Go to Solution.
Hi @AW-FP,
Thanks for reaching out to the Microsoft fabric community. and thanks to @PauReis & @krishnakanth240 & @Murtaza_Ghafoor for sharing valuable insights.
Thanks for confirming. Since the Environment is Demo and the Company Name matches the name in Business Central, please try updating these values and refreshing the semantic model again.
Hopefully, this resolves the issue. Please let us know how it goes.
Hi @AW-FP
Fix it by going to semantic model Settings - Data source credentials in Power BI service and choose Edit credentials and re-sign with your credentials with OAuth2. Ensure you have the right access privileges in workspace level before you do above steps, if not check with your Admin for the access
https://learn.microsoft.com/en-us/power-bi/connect-data/service-datasets-permissions
https://learn.microsoft.com/en-us/power-bi/connect-data/service-datasets-manage-access-permissions
https://learn.microsoft.com/en-us/power-bi/connect-data/refresh-troubleshooting-refresh-scenarios
Hi again, now getting a new error here: Expression.Error: The environment "Add environment name here" does not exist
Looked in the Semantic Model, Settings, but can't see where this setting might be? Any ideas?
@AW-FP That new error is better news than it looks, because it means you're past the credentials problem and into a much smaller one.
"Add environment name here" isn't a value that came from your tenant. It's the literal placeholder text the Business Central app ships with, so what the error is really telling you is that the app's Environment parameter was never filled in. Power Query is dutifully trying to reach a Business Central environment actually named "Add environment name here", and of course no such environment exists. That's also why the credentials advice further up the thread didn't get you anywhere. Re-entering a password can't rescue a connection that's pointed at an environment which isn't there.
The reason you can't find it under the semantic model's Settings is that it isn't set there. These Business Central apps are template apps, and the parameters get entered in the app's own Connect step rather than on the model. Go to Apps in the left navigation pane, pick the Business Central app you installed, and choose Connect. You'll be prompted for Company Name and Environment, and that's the dialog whose defaults are still sitting there untouched.
Two things worth knowing before you fill it in, since they're the usual next stumble. For Environment, if nobody has created extra sandboxes for you, the value is Production. For Company Name, use the full name rather than the display name, which you'll find on the Companies page in Business Central under the Name field. Putting the display name in there instead gives you a different and fairly baffling error about a key not matching any rows in the table.
Which environments do you actually have, and does the Name on your Companies page match what you'd been entering?
Thank you and very helpful to understand. I'll give that a try.
Environment is Demo, and the company name is the same as the name on the companies page in Business Central so hopefully this will work now.
Hi @AW-FP,
Thanks for reaching out to the Microsoft fabric community. and thanks to @PauReis & @krishnakanth240 & @Murtaza_Ghafoor for sharing valuable insights.
Thanks for confirming. Since the Environment is Demo and the Company Name matches the name in Business Central, please try updating these values and refreshing the semantic model again.
Hopefully, this resolves the issue. Please let us know how it goes.
Thank you all, for your help here.
I've got some traction with now being able to add the Environment and Company which has worked. I've resorted to deleting each app and reinstalling it as there does not seem to be an obvious way to update the app to the latest version.
Given this is a community thread, i'm grateful for the really positive offer of support here and thank you all for your input.
@AW-FP Glad it's sorted. One thing on your last point, because it'll save you real time next round: you don't have to delete and reinstall to get a newer version.
Template apps have an in-place update. When a new version ships you either hit Get it on the update banner or in the notification centre, or find the app in AppSource again and choose Get it now, then pick "Update the workspace and the app". The bit that matters for you specifically is that overwriting keeps the configured parameters and authentication, so the Environment and Company values you just got working carry over instead of being re-entered for every app. It also never deletes reports or dashboards you've added yourself.
Two things worth expecting so it doesn't look like it's gone wrong. It drops back to sample data until the refresh after the update finishes, which is normal and documented rather than a sign the update failed. And if you originally installed these through a direct link rather than through AppSource, you won't get an update notification at all, which is documented behaviour and is probably why there seemed to be no obvious path to a newer version in the first place.
@AW-FP That clears it up, and it is good news. Installing from inside app.powerbi.com is the Marketplace route, not the direct link one, so the caveat I mentioned does not apply to you. You should be on the notification path: when a new version ships you get an update banner in the Power BI service telling you a new version is available, and a notification in the notification pane.
For the Business Central apps specifically, the documented way to update is the same place you installed from. You go back to the Marketplace install link for the app and choose Get it now, and that is both the install path and the update path. The reason it probably felt like there was no obvious route is that those links are version specific. There is one set for Business Central 27.0 and later and a separate set for version 26, so if you land on a link that does not match your environment version it looks like nothing newer exists. Worth checking which BC version you are on first, then using the matching link for each functional area.
One thing I would flag now rather than after it bites you, because it is Microsoft's own recommendation and it is aimed exactly at your situation. They advise keeping the template app workspaces highly governed and not using them directly, and instead keeping copies or custom versions of the reports in a separate workspace per company. The reason is that upgrading the template app workspace can lose report customisations you have made in it. Since you have several of these apps and you have just spent real time getting the parameters right, that is a cheap habit to adopt before you start customising rather than after an update wipes something.
Also worth knowing if you have more than one company: these apps work per company, so you install and configure a separate template app for each one, each in its own workspace. Was the plan to run several companies through this, or is it just the one?
Thanks, will give that a go
HI @AW-FP,
This is more likely authentication problem raher than some issue with PowerBI
,
If this helps, ✓ Mark as Kudos | Help Other
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
| User | Count |
|---|---|
| 12 | |
| 10 | |
| 9 | |
| 5 | |
| 5 |