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
brunozanoelo
Helper V
Helper V

Error 403 when making a get command

Hello guys, I am facing a problem when I try to perform a get on the API I'm developing command. Did they could to help?

I have to get to get acesstoken, but when I make a get any (group list), the system returns me the error 403 (unauthorized access).

I have tested everything and I can not make the get, I've checked the permissions on my azzure directory and also checked the uri, what could it be? Here some pictures of my code and it returns me ...

 

btn_comando.pngpermissoes.png

I am very grateful if you help me!

7 REPLIES 7
Eric_Zhang
Employee
Employee

@brunozanoelo

 

  1. Based on my test, the token is case-sensitive, try "Bearer " instead.
  2. As per the BOL Get Groups,  to get groups, the url is https://api.powerbi.com/v1.0/myorg/groups.
  3. It seems that you're trying to access the REST API via PL/SQL in Oracle, try to test the API via postman at the first.

 

Hello Friend @Eric_Zhang! Thank you so much for your answer. As you said, I tried to work with the postman did not work, I managed to get success with acesstoken, but when I try to run the get command, still returns me the error 403 (as printscreen attached).



What can it be? I'm desperate, I do not know what can be.

Waiting for one answer!! Thanks a lot for the help!

Screen Shot 10-19-16 at 08.44 AM.PNG

 

 


@brunozanoelo wrote:

Hello Friend @Eric_Zhang! Thank you so much for your answer. As you said, I tried to work with the postman did not work, I managed to get success with acesstoken, but when I try to run the get command, still returns me the error 403 (as printscreen attached).



What can it be? I'm desperate, I do not know what can be.

Waiting for one answer!! Thanks a lot for the help!

Screen Shot 10-19-16 at 08.44 AM.PNG

 

 


@brunozanoelo

 

The access token in the picture looks weird. Ususally a valid token is starting with "ey",like "eyJ0eXAiOiJKV1QiLCxxxxxx", how did you get that access token?

HI @Eric_Zhang! Thank you for your reply...

I got this access token in the postman, in the button "Get new access token".

Apparently it seems that acesstoken is wrong?

To get the accessToken I informed these settings in the postman:

Screen Shot 10-20-16 at 08.07 AM.PNG

 

 

Hello my friend @Eric_Zhang, Fine?

I deleted my application and remade from scratch, as the steps that give the power of bi site, apparently everything is okay but I still can not make the get command.

One strange thing I noticed was that if I run in production mode in the apiary, I can make successfully get command, but the postman not...

@brunozanoelo

 

Well, I seem to get the global scenario.

 

  • You're developing in Delphi, while in Delphi there's no known integration API to get the token as in C#.
  • You're trying to get the token via postman then apply the token in Delphi to import pbix file to Power BI Serivce.

So

  1. I don't know how postman works to get that token, that token looks wrong.
  2. Try to get the token via C# getting-started-for-dotnet-import (you're requesting token via postman, did you have any approach to integrate postman with Delphi?) and write the token somewhere, maybe in a text file. In Delphi import the pbi file with the token in text file. The token can expire, so you would have to re-run the C# to get a new one.
    Or as I sugguested before, check Call C# dll from Delphi.
  3. The registered app is a native client app, cilentid is enough to get the token.

@Eric_Zhang, my application is in delphi programming language and is used in desktop, so the app registration must be in Native client app, correct? Whitout the secret client ID, is that correct?

See this image of all permissions granted for my app, i think is all fine.

i think is something about the configuration of my app, idk, because in the postman i got the same error (403).

 

Screen Shot 10-19-16 at 09.22 AM.PNG

  

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.