Forum Discussion
Connecting to an API....
Hello Everyone,
I am currently trying to connect via API to the Knowbe4 platform however I am getting authorization issues. I keep getting access denied and it will not accept my API token.
Can anyone help?
Here is the link to the information they provide for the setup: https://developer.knowbe4.com/reporting/#tag/Authentication
10 Replies
- MattPennerVVRegular Visitor
Hi Anonymous,
I just created a Power BI report against KnowBe4 for one of our recent campaigns. I had much the same questions as I had not done this before and came across your post when I was searching for answers.
First off, when you enable the Reporting API in your Account Settings ensure you scroll all the way down and hit the save button. Some of their site settings save immediatley when you click on them and others you have to specifically click the save button. When I first enabled the API I was getting not authorized errors like you. I then scrolled all the way down (it's a long way) and saw a Save button. When I clicked that within a few seconds I started getting results.
To get the data I used the Web source. Enter the following:
- Click on the Advanced option
- In the URL Parts textbox enter the desired URL from the KnowBe4 API. Make sure to use https and not http otherwise KnowBe4 will reject it
- In the HTTP request header parameters section, in the left textbox enter "Authorization"
- In the right textbox enter "Bearer APIToken" , substituting your KnowBe4 API Token. Ensure there is a space between Bearer and your token.
That's it. When you click OK you should start seeing data come in.
Hope that helps.
- AlexanderPrimeSolution Supplier
Appreciate that this is old but thanks for this. Been struggling with this and this was the clearest and easiest instruction I've used that worked!
Though will add that when it prompts for credentials, to use "Anonymous" and resist the urge of using the API option. - RobertCurrie360New Member
I've been struggling for days trying to get KingswaySoft to connect to the KnowBe4 API and this little tidbit is what finally got the lightbulb on for me and fixed my issue. Thanks. I had built up a quick and dirty Powershell script that did the job but was a bit more crude that what I can accomplish with KingswaySoft.
- srahzafar9Regular Visitor
Hi Matt,
This was very helpful. thank you so much. I am assigned to create a Training activity report in Power BI on all campaigns. Do you by any chnace have any API for that?
- parry2kSuper User
Anonymous do you have your access token from them?
- AnonymousNot applicable
Yep I have the access token from them but when I try to add it in the authorization says it has failed.
- rlufcy1New Member
I am having the same issue. There is no instructions for PowerBI from KnowBe4. Any help would be appreciated.
- mahoneypatMicrosoft Employee
Can you share your M code (with a modified token, of course)? Did you include "Bearer " in your Authentication record?
Regards,
Pat
- parry2kSuper User
Anonymous try something like this and then add the next steps.
let #"API Key" = "your api key", Source = Json.Document( Web.Contents("http://your url", [ Headers = [Bearer = #"API Key"] ])) in Source - jbensonHelper III
I am also having problems getting know b4 data to flow to power bi. Did anyone get their know b4 power bi issue resolved?