Forum Discussion

coding78's avatar
coding78
Frequent Visitor
8 years ago

'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.

7 Replies

  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft 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?

  • 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/[email protected]"></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>

     

     

     

  • 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.

  • EmmaF's avatar
    EmmaF
    New Member

    I have the same issue.  Did anyone find an answer?