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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
apoitou
Regular Visitor

Getting "Expression.Error: Access to the resource is forbidden." while invoking Jira dynamically

Hello group, 

 

I fighting with the bellow since a while now : 

apoitou_0-1727702424351.png

I trying to create a dynamically a call to Jira REST API to get the status of an issue. I'm building the URL from the column I'm getting from another system (Easyvista). 

Table.AddColumn(#"Added Custom", "InvokeJiraStatus", each "https://jira.gemalto.com/rest/api/2/issue/"&[External Ticket 1]&"/?fields=status"),

ANd I'm getting a Access to the resource is forbidden error 

apoitou_1-1727702561447.png

whereas if I'm invoking directly the API (with hardcoded [External Ticket 1], like for instance :

Table.AddColumn(#"Added Custom", "InvokeJiraStatus", each "https://jira.gemalto.com/rest/api/2/issue/DISITMANUF-3/?fields=status")

I'm gettin no error.

 

Googled for  Expression.Error: Access to the resource is forbidden but mostly it is authetication issues with Sharepoint, or other sources, but this doesn't seems to be my case since hardcoded call works fine. 

 

Any help is welcome, thanks in advance, 

Alex

3 REPLIES 3
apoitou
Regular Visitor

Thank you very much lbendlin for getting back to me so quickly. Much appreciated.

 

Unfortunatly it seem that using RelativePath doesn't solve my issue: 

 

When I'm simply using WebContent all is fine

#"Added Custom1" = Table.AddColumn(#"Added Custom", "InvokeJiraStatus", each [External Ticket 1]&"/?fields=status"),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom1",{{"InvokeJiraStatus", type text}}),
#"Added Custom2" = Table.AddColumn(#"Changed Type1", "ResultingJiraStatus", each Web.Contents("https://jira.gemalto.com/rest/api/2/issue/",[RelativePath = [InvokeJiraStatus]]))

But When adding Json.Document in front, to parse Web.Content ,

 

= Table.AddColumn(#"Changed Type1", "ResultingJiraStatus", each Json.Document(Web.Contents("https://jira.gemalto.com/rest/api/2/issue/",[RelativePath = [InvokeJiraStatus]])))

 

same error, Expression.Error: Access to the resource is forbidden is raised  

apoitou_0-1727767516893.png

What am I doing wrong ? 

You should  use the Query parameter instead of making the query part of the RelativePath

 

lbendlin
Super User
Super User

Please follow the documentation. Use RelativePath and Query parameters. https://learn.microsoft.com/en-us/powerquery-m/web-contents#example-1

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.