cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
coding78 Frequent Visitor
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.

5 REPLIES 5
Moderator Eric_Zhang
Moderator

Re: 'Not Found' during GetReportsInGroupAsync


@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?

coding78 Frequent Visitor
Frequent Visitor

Re: 'Not Found' during GetReportsInGroupAsync

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".  powerBIEmbedded_AppOwnsData.PNGGetReportsInGroupAsync

coding78 Frequent Visitor
Frequent Visitor

Re: 'Not Found' during GetReportsInGroupAsync

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

apomene12 Occasional Visitor
Occasional Visitor

Re: 'Not Found' during GetReportsInGroupAsync

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>

 

 

 

FlashCrowz Frequent Visitor
Frequent Visitor

Re: 'Not Found' during GetReportsInGroupAsync

Same is happening to me