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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
salih7
New Member

Dynamics 365 Expression.Error: Access to the resource is forbidden.

I am fetching data from Dynamics with the M query 

let
Source = OData.Feed("https://jcl-prod.operations.dynamics.com/data", null, [Implementation="2.0"]),
FilterSampleRows = Table.SelectRows(Source, each ([Name] = "Abbreviations" or [Name] = "AbsenceCodes" or [Name] = "Customers"))
in
FilterSampleRows

 

It returns three columns Name, Data (Expandable), Signature. If I click expand the column Data, I get "Expression.Error: Access to the resource is forbidden". I checked individual tables separately, actually the table "AbsenceCodes" only not accessible, but other two tables are accessible.

I want to add a column that says if each table is accessible or not Accessible, so that I can filter only accessible tables and expand them.

1 ACCEPTED SOLUTION
v-sgandrathi
Community Support
Community Support

Hi @salih7,
Thanks for using Microsoft Fabric Community Forum.

To resolve the "Expression.Error: Access to the resource is forbidden" error you're encountering in your query, we recommend the following approach:

First, we can verify if each table is accessible before attempting to expand its data. This can be achieved using the try...otherwise construct in M language, which checks the accessibility of the Data column for each table. If the expansion of the Data column is successful, the table will be marked as Accessible. If the operation fails it will be marked as Not Accessible.

We will then add a new column, AccessStatus, to indicate whether each table is accessible or not. Afterward, we can filter out the tables marked as "Not Accessible" and expand the "Data" column only for the accessible tables. This process ensures that only the tables which can be expanded will be included in the result, thus avoiding the access error and allowing smooth data retrieval.

If you need further assistance or have any questions, feel free to reach out.

Please Accept as solution if this meets your needs and a Kudos would be appreciated.

 

Thank you.

View solution in original post

4 REPLIES 4
v-sgandrathi
Community Support
Community Support

Hi @salih7,
Thanks for using Microsoft Fabric Community Forum.

To resolve the "Expression.Error: Access to the resource is forbidden" error you're encountering in your query, we recommend the following approach:

First, we can verify if each table is accessible before attempting to expand its data. This can be achieved using the try...otherwise construct in M language, which checks the accessibility of the Data column for each table. If the expansion of the Data column is successful, the table will be marked as Accessible. If the operation fails it will be marked as Not Accessible.

We will then add a new column, AccessStatus, to indicate whether each table is accessible or not. Afterward, we can filter out the tables marked as "Not Accessible" and expand the "Data" column only for the accessible tables. This process ensures that only the tables which can be expanded will be included in the result, thus avoiding the access error and allowing smooth data retrieval.

If you need further assistance or have any questions, feel free to reach out.

Please Accept as solution if this meets your needs and a Kudos would be appreciated.

 

Thank you.

Hi @salih7,

May I ask if you have gotten this issue resolved?

If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

Thank you.

Hi @salih7,


we haven't heard back from you regarding our last response and wanted to check if your issue has been resolved.

If our response addressed by the community member for  your query, please mark it as Accept Answer and click Yes if you found it helpful.

Should you have any further questions, feel free to reach out.


Thank you for being a part of the Microsoft Fabric Community Forum!

Hi @salih7,

 

Following up to check whether you got a chance to review the suggestions given. If the issue still persists please let us know. Glad to help. 

If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

 

Thank you.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors