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
coding78
Frequent Visitor

'Not Found' during GetReportsInGroupAsync

I have downloaded the power bi sample. I have worked through the authentication issues, I have assigned permissions through the azure portal, I have created a report on my power bi desktop, and published it to the workspace. However, when the program calls  var reports = await client.Reports.GetReportsInGroupAsync(GroupId); I get Server Error in '/' Application. Operation returned an invalid status code 'NotFound' I have tried to search everywhere for this error but can't seem to figure out what I have missed to get this error. Any help would be appreciated?  Not sure if I am posting in the correct spot for help either, please let me know the correct spot to post and delete if need be.

6 REPLIES 6
Zin_Mi_Mi_Ko
New Member

Hi,

 

Is issue already resolve? I'm also facing this issue with same.

Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'NotFound'

If your end solved already, pl suggest me.

apomene12
New Member

NOt Sure If should use a reply, since I am also facing similar issue :

 

Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'NotFound'

 

 

Stack Error (from Fiddler):

 

 

<script src="https://npmcdn.com/es6-promise@3.2.1"></script>
<script src="/scripts/powerbi.js"></script>

    <div id="errorWrapper">
        <h2>
            Error
        </h2>
        <pre>
            Microsoft.Rest.HttpOperationException: Operation returned an invalid status code &#39;NotFound&#39;
   at Microsoft.PowerBI.Api.V2.Reports.&lt;GetReportsInGroupWithHttpMessagesAsync&gt;d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.PowerBI.Api.V2.ReportsExtensions.&lt;GetReportsInGroupAsync&gt;d__37.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at PowerBIEmbedded_AppOwnsData.Controllers.HomeController.&lt;EmbedReport&gt;d__11.MoveNext() in C:\Dev\<**************>\Dev-branch\App Owns Data\PowerBIEmbedded_AppOwnsData\Controllers\HomeController.cs:line 93
        </pre>
    </div>

 

 

 

Same is happening to me

Eric_Zhang
Employee
Employee


@coding78 wrote:

I have downloaded the power bi sample. I have worked through the authentication issues, I have assigned permissions through the azure portal, I have created a report on my power bi desktop, and published it to the workspace. However, when the program calls  var reports = await client.Reports.GetReportsInGroupAsync(GroupId); I get Server Error in '/' Application. Operation returned an invalid status code 'NotFound' I have tried to search everywhere for this error but can't seem to figure out what I have missed to get this error. Any help would be appreciated?  Not sure if I am posting in the correct spot for help either, please let me know the correct spot to post and delete if need be.


@coding78

Could you post the more code snippet? The accesstoken seems good, otherwise you may encounter some error saying "invalid status code "unauthorized"".  What is going on if you call the REST API Get Reports in POSTMAN with that accesstoken?

Eric, 

In PostMan - I am not sure if I am calling properly (please let me know if I need a different call or Keys)

 

https://embedded.powerbi.com/appTokenReportEmbed?reportId=REPORTID

And it gives me a 200 OK, and a ton of HTML

 

However if I call a

https://api.powerbi.com/v1.0/myorg/groups/GROUPID

with an AuthorizationKey as the access key from the app registry

and get a 403 Forbidden

Thanks Eric. Yes I have the "unauthorized" errors corrected and this was the next step in the sample sln. I am using the "PowerBIEmbedded_AppOwnsData.sln".  GetReportsInGroupAsyncGetReportsInGroupAsync

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.