cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AmyF
Frequent Visitor

Can you connect to OneDriveForBusiness using PowerApps alone?

Hello,

I need help.  

I want to connect my PowerApp to OneDrive for business.  I want to list out the contents of a directory using wild cards, if possible.  I THINK I need the API and I believe I have to "Connect" to the OneDrive for Business API to do this because I want to use a dynamic filename.    Something like /Root/PortalDirectory/Attachments/*CaseID*   that would list out the files in that directory matching my CaseID.

 

But before I can even begin I need to connect to the OneDriveForBusiness connector and when a friend was trying to help me, it seemed to expect an excel file.  And then when I try to search for that, I see a lot of information connecting using Flow or Power Automate.  I simply want a direct connection from my app.  Is that possible?  If so, how?

 

Thanks very much

1 ACCEPTED SOLUTION

Accepted Solutions
BCBuizer
Super User
Super User

HI @AmyF ,

 

All I mentioned is that the OOB OneDrive connector doesn't provide the functionality you described, but that doesn't mean there is no way. I don't have experience with this, but the below are some ideas that may work:

- File system connector https://docs.microsoft.com/en-us/connectors/filesystem/ (requires a gateway)

- SharePoint connector https://docs.microsoft.com/en-us/connectors/sharepointonline/ (requires sync between OneDrive and SharePoint library)

- Custom Connector https://cloudatica.medium.com/power-apps-custom-connector-using-microsoft-graph-apis-d3b1d821e4fd 

 

@RandyHayes@WarrenBelz, @TheRobRush : Anything you can add on the subject?



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

5 REPLIES 5
BCBuizer
Super User
Super User

Hi @AmyF ,

 

There are connectors for OneDrive you can add to PowerApps:

BCBuizer_0-1648159447740.png

However, in reality they only allow you to connect to Excel files that are stored on OneDrive:

BCBuizer_1-1648159513471.png

So the short answer to your question is: No



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
AmyF
Frequent Visitor

So, just to clarify, there's no way to use the OneDriveforBusiness API  from PowerApps?

I'm finding this so hard to believe - I'm sorry but simply listing a directory's contents?  CAN'T be done?  What is up with that?  I'm sorry I'm incredulous about this.  It baffles me.

BCBuizer
Super User
Super User

HI @AmyF ,

 

All I mentioned is that the OOB OneDrive connector doesn't provide the functionality you described, but that doesn't mean there is no way. I don't have experience with this, but the below are some ideas that may work:

- File system connector https://docs.microsoft.com/en-us/connectors/filesystem/ (requires a gateway)

- SharePoint connector https://docs.microsoft.com/en-us/connectors/sharepointonline/ (requires sync between OneDrive and SharePoint library)

- Custom Connector https://cloudatica.medium.com/power-apps-custom-connector-using-microsoft-graph-apis-d3b1d821e4fd 

 

@RandyHayes@WarrenBelz, @TheRobRush : Anything you can add on the subject?



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
AmyF
Frequent Visitor

@BCBuizer   Thanks very much, but messing around with the OneDrive URLs, I find I can do this without the API or Connector.  I just did a search on OneDrive for a particular caseID (not from within the app) and it filtered it out in the browser, so I was able to then test the URL using Launch and it worked just as it would if you were going after something on your local system.  So I can construct the url needed...   Stub1+CaseID+RemainderOfUrl.  I had tried that before and was unable to isolate what I needed.  I thought that an API and connector was overkill for what I needed and couldn't believe it was going to be so difficult to just get a listing, but it is my ignorance of OneDrive and messing up the "stub" that confounded me.  OD and PA are new to me.  Eventually the OneDrive directory will be moved to another area of our business onedrive and I will only have to change the stub when that happens.  

 

Thanks very much and I'm going to mark this as solved.

TheRobRush
Super User
Super User

I would just create a flow that runs and retrieves the contents of the onedrive, and the link to each file, then returns them to powerapps. It should be pretty straight forward. I would expect it to even allow you to open those files on your device outside of powerapps via launch() command

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (4,991)