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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
JGOIZET
New Member

Ignore Mashup.Engine.Interface.RessourceAccessForbiddenException

Hi everybody,

 

I have an significant issue and i have not found any solution, so I require your help.

 

I made query who ask information from an API. I have no particular issue on it. For now, I copy my query forty times to made it each time and each time with a different dedicated number called "division_num". I am trying to do it from a table with all my "division_num" in.

 

My report is supposed to be used by several people and each people has not the same rights to access to division number. When i do a query for each division, no problem because unavailable division query doesn't work.

But, when i trying to do it from a table with all my "division_num", my query (as function) crash with the following message.

JGOIZET_2-1702482363708.png

 

It ok of that because, the user cannot access to at least one division.

 

My question and my issue is that, how can i do to ignore if division is not accessible ?

when y tried to use "try....otherwise" I have the same error message.

I want to do a condition like that :

when the API call is forbidden by the user then null else QUERY.

 

For information, i tried to Table.Combine of all my fourty query but i had the same error.

 

Thanks in advance for your help.

1 ACCEPTED SOLUTION

Hi Ibendlin,

 

I try that before without success, but i search another solution with your tip and I found the following :

let

url = https:\\ ....

hearders = paramaters 

response = Web.Contents(url, [Headers=headers, ManualStatusHandling={403,401,404,500}]),
Test=Value.Metadata(response),
success = Json.Document(Web.Contents(url, [Headers=headers]))[d],
Data=if Test[Response.Status] = "200" then success else
#table(
type table[Amount = number, Division = text],
{{0, Division}})

 

It look succed. 

I will try it in my full case.

 

Thanks a lot 😉

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

Read about ManualStatusHandling:  Web.Contents - PowerQuery M | Microsoft Learn

Hi Ibendlin,

 

I try that before without success, but i search another solution with your tip and I found the following :

let

url = https:\\ ....

hearders = paramaters 

response = Web.Contents(url, [Headers=headers, ManualStatusHandling={403,401,404,500}]),
Test=Value.Metadata(response),
success = Json.Document(Web.Contents(url, [Headers=headers]))[d],
Data=if Test[Response.Status] = "200" then success else
#table(
type table[Amount = number, Division = text],
{{0, Division}})

 

It look succed. 

I will try it in my full case.

 

Thanks a lot 😉

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.