Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Open .ODC connection in R

I have a .odc (office data connection) that connects Excel to a web service (MSBI, Web PowerBI). ]
It's working fine.

How can I open this connection directly from R?

 

The odc file contents are:

 

     <odc:ConnectionString>
        Provider=MSOLAP;
        Integrated Security=ClaimsToken;
        Identity Provider=https://login.microsoftonline.com/common, 
        https://analysis.windows.net/powerbi/api, xxxxxx-xx-xx-xxxxxx;
        Data Source=pbiazure://api.powerbi.com;
        Initial Catalog=xxxxx-xxxx-xxxx-xxxx-xxxxx;
        MDX Compatibility= 1;
        MDX Missing Member Mode= Error;
        Safety Options= 2;
        Update Isolation Level= X;
        Locale Identifier= 10XX
        </odc:ConnectionString>

 

 

This is what I tried so far:

 

powerbi.app <- oauth_app(
appname = "pbiazure://api.powerbi.com XXXX-XX-XXX-a611",
key = "XXXXXXXXX",
secret = "XXXXXXXXX")

powerbi.token <- oauth2.0_token(powerbi.urls, powerbi.app,
user_params = list(resource = "https://analysis.windows.net/powerbi/api"),
use_oob = FALSE)

 


But it is returning the following error:

 

> AADSTS900561: The endpoint only accepts POST, OPTIONS requests. Received a GET request.

 

 

In the end of the day, I just want to load my company's "queries/view" available on PowerBI Web  directly into R.  

Thanks,

0 REPLIES 0

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.