Forum Discussion
Setting up an Odata connection for Cornerstone API Reporting connector
- 4 years ago
Can you confirm you have the two scopes below selected for the App on the Cornerstone side. My issue was similar where it was working in Postman but not in PowerBi until I enabled the scope reportingmetadata:view. Another thing you could try for troubleshooting is setting the app to a user that has full permissions in Cornerstone with all the scopes enabled. If it works then it would just be narrowing it down to the permissions you are missing.
Troubleshooting Tips
-
sessionToken in the URL is case sensitive.
-
Make sure the API and sessionToken are active and enabled via the Edge API page.
-
If you get the error: "Expression.Error: The 'Authorization' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Language, Cache-Control, If-Modified-Since, Referer" this means the OData authentication type is not set to Anonymous. To modify the setting, navigate to File > Options and settings > Data source settings. Find your data source URL from the list, click Edit, edit the credential type to be Anonymous, and click Done. Try again.
See if it will help:https://github.com/cornerstoneondemand/CSOD-Power-BI-Integration-Utility/blob/master/README.md
- juankypanky4 years agoFrequent Visitor
Good afternoon.
Thank you very much for your help. All three points were tested before and is not working yet. The github repository is related to an old API call with username and password, but now with OAuth 2.0 a token is generated with the idclient and an idsecret. The script is working but fails at the last line:
Source=OData.Feed(odata_url,[#"Authorization" = authToken],null),
and a screen asking for credentials "we were unable to authenticate you with the credentials provided. Try again". If I click "connect" this screen appears over and over again.
- RichardR4 years agoNew Member
I was able to connect succesfully using the method in the first article you mentioned, https://csod-external.force.com/supportcentral/s/article/How-do-we-integrate-Power-BI-with-the-Reporting-API?language=en_US.
I originally had the same error but fixed it by ensuring the scopes and permissions are set correctly in Cornerstone. In my case I was missing the scope for the Metadata.
- juankypanky4 years agoFrequent Visitor
Hi Richard,
I thought that the problem was the same as you mention in your message... if you try to connect to the reporting API, you should specify the "read" term at the end of the view i.e. vw_rpt_users:read.
Unfortunately I still can't connect... I can connect and obtain data using the simulation of the "Webservice practice lab" at https://csodapi.com/... but not trhough Power BI... maybe I need to try with other scopes in other environment. I will tell you soon if I can advance with the correct way.
Thank you very much for your help,
JC