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
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
@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.
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?
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.
Hi @AmyF ,
There are connectors for OneDrive you can add to PowerApps:
However, in reality they only allow you to connect to Excel files that are stored on OneDrive:
So the short answer to your question is: No
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional