Power Apps DIRECTLY upload files to SharePoint Document Library | GRAPH API

Поділитися
Вставка
  • Опубліковано 5 вер 2024

КОМЕНТАРІ • 505

  • @petereriksson6859
    @petereriksson6859 Рік тому +32

    This is so good Rezaa who needs Netflix when you are in UA-cam :)

    • @RezaDorrani
      @RezaDorrani  Рік тому +6

      I need Netflix :)

    • @arydias85
      @arydias85 Рік тому +3

      ​@Reza Dorrani We need You ! 😅

  • @zerokhan858
    @zerokhan858 Місяць тому

    Reza, I wanted to say that I got a job as a PowerPlatform Developer, and it's mainly because of you, because from your videos I've learnt so much. I will be forever grateful

    • @RezaDorrani
      @RezaDorrani  Місяць тому +1

      Congratulations! Very happy to hear the news.

  • @BrianWainman
    @BrianWainman 9 місяців тому +1

    Reza - you are a genius! Whenever I am trying to do something in Power Apps, I always come back to you. With this video you get a file into Sharepoint (with no Flow). By using the code you made to get files to show in the pdfviewer (another excellent video) and putting that code into the Record.Value here, you can now backup a file to pdf in another library - I have used it as part of a document control to supersede the old version as a pdf

    • @RezaDorrani
      @RezaDorrani  9 місяців тому

      Thanks so much Brian.
      I always think why dont folks mix concepts from 2-3 video and here you are. So happy to hear that you have built a solution using multiple videos.

  • @Deadpool12353
    @Deadpool12353 Рік тому +5

    Amazing Reza, I wish we can have another channel on Python from you. I know its too much to ask but your content delivery has been soo simple and straight forward to the community.

    • @RezaDorrani
      @RezaDorrani  Рік тому +4

      I wish I knew Python! If ever I learn it, I would plan on one.

    • @vinayayinapurapu
      @vinayayinapurapu Рік тому +1

      @@RezaDorrani Reza never says NO. :)

  • @neorecharge
    @neorecharge Рік тому +1

    OMG... you're a GENIUS!!! I've been trying to get my app to upload file attachments for the last 3 weeks using power automate. This worked first try! THANK YOU!!!!!

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Most welcome!
      Be careful of the file size limit (its small) :)

  • @michalsubrt323
    @michalsubrt323 Рік тому +2

    Nice video. For who is not see Libraries IDs, dont forget activate Document ID service under Site Collection Features.

    • @RezaDorrani
      @RezaDorrani  Рік тому

      I did not know that. Thanks for sharing the tip on document ID service

    • @kurthenderson6848
      @kurthenderson6848 Рік тому

      Michal and Reza, I am getting a null array when I try and use the http request to get the library IDs. Are you saying you have to have the Document ID service turned on in order to get a return list of the library IDs or is this possibly a permission issue? Is there any other way to get to the library ids?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Looks like it is needed as per Michal. Is there any issue in turning it on?

    • @mmipeconfidence2923
      @mmipeconfidence2923 Рік тому +2

      @@RezaDorrani I have activated the documents ID Service still I can't get the IDs on the api?

    • @alizishan4306
      @alizishan4306 Рік тому

      @@mmipeconfidence2923 did you get ID's?? I'm facing the same problem

  • @mattiee
    @mattiee 5 місяців тому +1

    This was even better method for uploading files than with flow. And i was able to get it work this time 🙂 But i like to use dynamic variable for upload to target folder, instead of root. I manage to insert variable between http-request, but this make only whole path folders to root.

    • @RezaDorrani
      @RezaDorrani  5 місяців тому

      Thanks!
      Not sure how I could help here.

    • @mattiee
      @mattiee 5 місяців тому +1

      @@RezaDorrani ok. I figure it out some day. I have learned how to use Graph API in practice. Thanks to you. You are greate teacher!

    • @mattiee
      @mattiee 5 місяців тому +1

      @@RezaDorrani there it was, when watch the video to the end. Using Substitute solve my issue 😂 My App works now perfectly. Thanks!

  • @dquagliano
    @dquagliano Рік тому +2

    Awesome as usual, Reza! I run into an issue I managed to solve this way: When quering drives, it won't return any data unless modify permission right there in the "Modify permissions" tab, and concent Sites.Read.All, Files.ReadWrite, Files.ReadWrite.All, Sites.ReadWrite.All in my logged in session from Graph Api Explorer (all delegated permissions so no admin concent requested as Reza states :) ). Cheers!

    • @RezaDorrani
      @RezaDorrani  Рік тому +2

      Good tip! This one is in the graph api explorer.

  • @rajeshlohana100
    @rajeshlohana100 Місяць тому

    Crisp and clear lecture - Excellent

  • @youtube_Salim
    @youtube_Salim Рік тому +1

    Thank you reza, it's the 1st time that I discover this with powerapp, ... really it's great👌

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Thanks Salim. I tried to show a different technique to upload files :)

  • @JasonRoberts-zk5ns
    @JasonRoberts-zk5ns Рік тому +1

    Awesome. I've had mixed results using PowerAutomate to upload files (often seems slow to trigger), so it's great to learn an alternative.

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Thanks!
      Do check documentation though for limitations with file size and more.

  • @Saif_Ali_Khan_1301
    @Saif_Ali_Khan_1301 Рік тому +1

    We can directly patch it as well using filecontent in library without graph api, but thanks to you I learnt graph api approach as well

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Great 👍

    • @sebastianmarin7290
      @sebastianmarin7290 Рік тому

      May I ask how did you upload the file just using patch? Without using power automate ? Thanks

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@sebastianmarin7290 Uploaded file using api directly from power apps. No usage of flow.

  • @StraighterSwing
    @StraighterSwing 3 місяці тому +1

    Hey Reza, GREAT video. Do you have an example of uploading a document to a folder that doesn't exist yet with GraphAPI? I know we can do it with PowerAutomate but was just curious.

  • @wadihrizk
    @wadihrizk Рік тому +1

    You are the reason why I have a youtube account.

  • @gslvqz8812
    @gslvqz8812 9 місяців тому +1

    Great tutorial on Attachments --> Doc Library

  • @jasonthedogcatcher
    @jasonthedogcatcher Рік тому +1

    This is great. Once the doc is uploaded, this app allows you to edit/update doc metadata, but what if you wanted to re-upload a replacement document as part of the document update process (without interacting with the SharePoint doclib directly)? That would be handy if it could all be done within the app.

    • @RezaDorrani
      @RezaDorrani  Рік тому +2

      Check and see if there is a graph api endpoint for that. I have not tried this scenario.

  • @bobleach
    @bobleach Рік тому +3

    Thanks Reza, you know I've been waiting for this 😁
    What great idea on his documents are uploaded, I guess the only Downside is the file limitation. Have you tried it with larger files? Are you aware if this limit is likely to increase at all?
    Also is that resetting the gallery by a variable reduces the impact then I'll look into putting that into my Apps in future - Might need to do a few tests tho.
    Thanks again, keep up the great work 👌

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      File size limitation is called out in video. Check comments on video - there are comments and responses for both your questions.

  • @user-bo4qe9ww5n
    @user-bo4qe9ww5n 11 місяців тому +1

    Thank you Reza. Your videos area really amazing!!. Great job!! Even, in the site, there are some lists and libreries, when I make the query, value is empty [ ]

    • @RezaDorrani
      @RezaDorrani  11 місяців тому

      You need to ensure you are consenting in graph api explorer.
      Top right there should be an option to consent.

  • @dineshb
    @dineshb Рік тому +2

    Amazing stuff!! This opens up new opportunities. Thank you

  • @The_US
    @The_US Рік тому +1

    Great video Reza, you are a game changer in powerapps!

  • @yttanel
    @yttanel Рік тому +1

    I could see this being useful to me down the road, Good stuff Reza :)

  • @GreyDob
    @GreyDob Рік тому +1

    Thanks Reza, perhaps this solution will fix another problem I have when using Power Automate. When I upload a document in Power Automate "Copy file" from 1 library to another with the "replace" option we lose the previous versions of that document.

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Video shows create new file. Check graph documentation to see if it has endpoints for copy file and more.

    • @khasimshaik2606
      @khasimshaik2606 Рік тому

      Hi, Reza I have a scenario like iam sharing a url through power automate flow by send email(v2) action. That link will expire after 21 days is there any idea about this Reza please help me

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@khasimshaik2606 I have no idea about this. Please post your query on forums at powerusers.microsoft.com

  • @akrutidhabu9210
    @akrutidhabu9210 Рік тому +1

    Great video!!! It saves extra work of creating a power automate flow. Could you please let me know if is it possible to check if a folder exists and if folder does not exists then first creating a folder then uploading the files inside it

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Possible, however for that a flow would be needed as the Get method for graph is not interpreted by Power Apps.

  • @dhananjaykharade2711
    @dhananjaykharade2711 5 місяців тому +1

    This is a really good new thing I learned today. I can see this approach supports a file size of 4 MB only. What is the approach to uploading large files in the SharePoint library without using Power Automate?

    • @RezaDorrani
      @RezaDorrani  5 місяців тому

      Power Automate

    • @dhananjaykharade2711
      @dhananjaykharade2711 5 місяців тому

      @@RezaDorrani You mean we need to use Power Automate to handle the actual upload of file chunks using SharePoint REST API? Automate would use HTTP requests to SharePoint to upload chunks of the file?

    • @RezaDorrani
      @RezaDorrani  5 місяців тому

      @@dhananjaykharade2711 Chunking will be super complex. Power Apps is not designed for uploading large files. Max I would say 20 MB per file. Beyond that you will see performance degradation.

    • @dhananjaykharade2711
      @dhananjaykharade2711 5 місяців тому

      @@RezaDorrani okay, what is the file size limit for uploading files using Power automate?

    • @RezaDorrani
      @RezaDorrani  5 місяців тому

      @@dhananjaykharade2711 I don't know the file size limit for power automate. It's about what's max file size power apps can handle as the file will be uploaded in apps.

  • @abhishekgore9039
    @abhishekgore9039 Рік тому +1

    Hi Raza, it is very helpful. Nicely explained. Thank you

  • @wjameswilliams
    @wjameswilliams Рік тому +2

    Thanks for the clear explanation Reza! HTTPRequest seems a very powerful method, but how do we know what permissions it has (like the ones you say it has at 8:30 ?) Is it any graph permission that doesn't show as "Admin Consent Required" on the Graph Explorer? Also given that there is now a HttpRequestV2 method which only has access to the groups segment, do you think Microsoft will deprecate the "V1" functionality?

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      I do not have the list of permissions (not documented). Im not sure about deprecation. Typically when a new version comes out, its recommended to use the latest one.

  • @sachadrousie3180
    @sachadrousie3180 7 місяців тому +1

    Hi Reza, love your videos! Wanted to ask you if you have ever tried to create a folder directly from PowerApps also? I tried it with graph API, but powerapps asks for the body of the request to be provided in binary format, and I do not know how to transform the JSON to binary.

    • @RezaDorrani
      @RezaDorrani  7 місяців тому

      Thanks!
      I have not tried creating a folder

  • @MrRtth
    @MrRtth Рік тому +1

    Wow! Thanks for informing me a new useful feature with API.

  • @DaniilStanisevschi
    @DaniilStanisevschi Рік тому +3

    Hey Reza this is awesome! Question on the Refresh() operation vs. the varReset variable and their differences/expenses on performance: how does the varRefresh consume less resources than Refresh() operation? Aren't both performing a lookup against the data source either way or am I missing something? If you could do a video on how to best leverage updating/refreshing collections after making record updates that write to SharePoint that'd be much appreciated!
    For example: I set a collection using a Filter() on a data source. I then create/modify an existing record via a form, but using data from the collection initially (maybe I set varFormRecord to ThisItem from a gallery that feeds from the collection). Now that the data has changed (we updated SharePoint from an Edit Form), what is the best performance-wise way to update the local collection without doing a ClearCollect() operation again? Is this possible?

    • @RezaDorrani
      @RezaDorrani  Рік тому +7

      The Refresh function retrieves a fresh copy of a data source
      learn.microsoft.com/en-us/power-platform/power-fx/reference/function-refresh
      The varReset technique simply re-triggers the Filter condition which in turns performs a delegable (server-side) query to get items.
      A lot is cached in power apps for performance reasons.
      I recommend connecting galleries to data source and preferably not load all data or filtered data in collections. Collections are stored locally in power app for user session.
      If you need static data, then collections makes sense.
      For data on which CRUD is being performed in apps, direct connection is a better option.

  • @drscott212
    @drscott212 Рік тому +2

    Reza this is an amazing video! I found it extremely helpful and it works flawlessly. I have one issue that I am running into. I want to sort by name in alphabetical order. However, the name column in SharePoint when used to sort gives a Delegation warning. But the Title column does not. Do you know of a way when uploading using the GraphAPI to set the Title column in SharePoint to the Attachment Name?

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Thanks!
      You cannot set metadata using file upload action. Even in SharePoint, one has to first upload file and then set its properties.
      You would need to first upload file and then use patch function to update its properties. I do not have a specific video on this though.

    • @drscott212
      @drscott212 Рік тому +1

      @@RezaDorrani Thank you for the speedy reply! If you do create a video that would be awesome. I tried using the Patch in graphAPI and couldn't get it to work. For now even though I didn't want to use Power Automate I just created a simple flow and sais when a file is created update the title column.

    • @RezaDorrani
      @RezaDorrani  Рік тому +3

      @@drscott212 I make videos when I receive multiple requests on a topic. Every quarter I ask subscribers for topic suggestions on Community Tab of my channel. Most voted idea gets added to my backlog. Make sure to post this idea whenever I post the next topic suggestion post.

  • @Psrk4287
    @Psrk4287 Рік тому +1

    Thanks. This is useful as we can now remove our power automate flows and use the direct connectors. We have struggled with power automate flows when we move our app and associated flows from one environment to another using solutions. The connection between the app and the flows always get disconnected when we move to higher environment as managed solution. We then have to edit the managed app and individually hit refresh on each of the associated flows.
    We also have flows that set permission on the list items in sharepoint online. Unfortunately, we have not found Graph API calls to update list item level permissions.

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      There are known challenges with flows with solutions that are connected to an App. All of them are well documented and hopefully the experience would be seamless in future.
      I have not explored all of the graph endpoints hence not sure if it has the permission apis for SharePoint.

  • @manikandhar
    @manikandhar Рік тому +1

    Ah! At last 🥳🥳🥳🥳🥳

  • @alibux
    @alibux Рік тому

    Thank you so much Reza! Very helpful walk through as usual, and also to learn about the HttpRequest method on the Office365Groups connector - lots of interesting possibilities via the MS Graph API.

  • @saisanthosh1697
    @saisanthosh1697 Рік тому

    Great to see New Power Apps Features... Brilliant Explanation...Keep up the good work..

  • @debernd82
    @debernd82 Рік тому +1

    Thanks and right on time for a solution for my problen. Yo're the best ☺

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      You're welcome 😊
      Please also check file size limitation as well shown in end of video :)

  • @neorecharge
    @neorecharge 11 місяців тому +1

    This has been an excellent tutorial. I had this working flawlessly.. but all of the sudden, I have no filename in between root:/ and /content on the output.. I wonder if they changed something

    • @RezaDorrani
      @RezaDorrani  11 місяців тому

      I have not come across the mentioned issue and hence not sure what the fix for your issue is. I recommend posting your issue with screenshots on the forums at powerusers.microsoft.com

  • @shaikhfirdos2723
    @shaikhfirdos2723 Рік тому +1

    Amazing video and great knowledge shared..thanks Reza..👏👏

  • @jjcamello8698
    @jjcamello8698 Рік тому +1

    Thank you so much for these Reza!

  • @bartbossuyt
    @bartbossuyt Рік тому +1

    very nice tutorial, how to upload a attacment and a note(multi line text) with the PUT? in short, i have a attachment and a text in a variable.

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Upload file action only uploads the file. After the file is uploaded, you would need to execute a Patch function to update any metadata.

    • @bartbossuyt
      @bartbossuyt Рік тому

      thx any idea where i can find a video?@@RezaDorrani

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@bartbossuyt I do not have a specific video on it.

  • @mdhidayat5706
    @mdhidayat5706 9 місяців тому +1

    Thank you so much Reza for sharing!

  • @user-sc6ly1wu7v
    @user-sc6ly1wu7v Рік тому +1

    Hi Reza. This was a very good and instructional video. I am new to PowerApps, but I have spent two days on your video, and now I got everything to work except the varCurrentPath. I want to save the files in a subfolder. I am on Sharepoint with Norwegian language, and I cant get it to work with "Shared documents/". Can you explain how I can find the root name of my Document library, and also the syntax of varCurrentPath

    • @RezaDorrani
      @RezaDorrani  Рік тому

      I do not have a specific video on this scenario. I had done it as part of one of the demos. In fact I did a video recently where I showed a full document library experience. I shared the entire code base (Member only). Link is in that videos description. Here is that video -> ua-cam.com/video/JxPznTUsaiQ/v-deo.html

  • @jasona7029
    @jasona7029 11 місяців тому +1

    I learn something new, thanks for the tutorial as always. Supposed I uploaded 2 files, I need to update a column dynamically based on the selected ID from the gallery. Is there an easy method to update the metadata?

    • @RezaDorrani
      @RezaDorrani  11 місяців тому

      First a file has to be uploaded. Metadata can be set after file upload is complete. You can use patch function or form control or graph api to update metadata.

  • @user-ic7ef1cc5s
    @user-ic7ef1cc5s Рік тому +1

    Thanks for al your great video's life savers.
    Is it possible that this method doesn't work with a sub sites ? My document library doesn't show up

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Thanks Steven.
      As per graph api docs, it should work with sub site as well.

  • @glennbenzing5551
    @glennbenzing5551 Рік тому +1

    Reza, why has Microsoft not included an attachment control in the group of controls under Insert? Seems that this would have been in the first version of Power Apps to me.

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      I wish it was a control readily available

  • @DavidAdediran
    @DavidAdediran Рік тому +1

    Amazing as always Reza. I wonder if there are end points for lists...

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      There are :)
      Check the graph api documentation

  • @aysanhaghani5271
    @aysanhaghani5271 Рік тому +1

    Hi Reza, Thanks for the great video, I was wondering if we can use the same connector for creating a folder ( POST /sites/{site-id}/drive/items/{parent-item-id}/children)

    • @RezaDorrani
      @RezaDorrani  Рік тому

      There are graph api endpoints available for creating folders. Check the graph api documentation.

  • @davidsheumaker3836
    @davidsheumaker3836 Рік тому +1

    Reza great video. I got it working but am struggling on uploading the files to a folder in the document library. What is the syntax for that?? Thank you.

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Video description has links to documentation. It states how to define folder path.

  • @suryaraochowdarykoduri
    @suryaraochowdarykoduri 11 місяців тому +2

    at 10:11 I struggled with enumerate the document libraries under the root site (Graph Explorer). Realized that I need to consent to permission under "Modify permissions" tab.

  • @angrybatvoice
    @angrybatvoice Рік тому +1

    Excellent video as always. Well done!

  • @JamieTorontoAtkinson
    @JamieTorontoAtkinson 10 місяців тому +1

    You are the man! Thank you for this video

  • @marianroca6329
    @marianroca6329 Рік тому +1

    As always thank you so much, just a problem... Can't find a way to list id of libraries of a subsite, the id of the subsite is the same as the parent and when I run the query to list the drives they won't appear :(

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      I am not sure about subsites. I have not tried it. I recommend checking or posting your query on the forums at powerusers.microsoft.com

  • @rayanmohammad910
    @rayanmohammad910 9 місяців тому +1

    Hello reza
    Thanks for sharing your videos, tutorials, and the valuable information you've provided.
    I have a question, I have a requirement to use sharepoint library to store files through power apps the files have a large size so can I open a link directly from power apps to the library and allow user to upload his files?
    Is there any points to take into consideration when doing that?
    Thank you again

    • @RezaDorrani
      @RezaDorrani  9 місяців тому

      I have not built any scenario with linking over to SP so not sure about considerations.
      1 thing for sure though - you will need to provide a refresh feature in app to load the latest files.

  • @vigneshm7011
    @vigneshm7011 Рік тому +1

    Amazing Reza 👏

  • @grantratcliff1059
    @grantratcliff1059 Рік тому +1

    Thanks Reza! Top tier content always. Question: I assume this would work with Azure blob storage, correct? And, if so, would that be more efficient and scalable?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      This video is specific to SharePoint doc library. Not sure about Azure blob storage.

  • @akashsinghal7307
    @akashsinghal7307 Рік тому +1

    Hi @reza, your content is always helpful. I have a question here related to this video
    In this video, we saw that we can upload a file in any Sharepoint document library. Can we make this process completely dynamically? This means you will get an option of different SharePoint sites - document library in a drop-down where they want to upload? and File viewer for different SharePoint sites in the Power app.

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Possible but you would somehow need the list of site ids and drive ids where files are being uploaded.
      However, to showcase data, you would need to connect to each of those data sources.

  • @allison7324
    @allison7324 Рік тому +1

    Incredible tutorial! I successfully made my power app using your video. One question, instead of uploading all files to root, is there a way to upload to a specific folder? I have 2 screens. 1st screen, has user input their information with a Next button; Next button when clicked will create a folder in the document library based on the user's name and go to second screen. 2nd screen will allow multiple file uploads, but uploads to root. how can i specify the newly created folder for the files to upload to? Thanks!!

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Possible! I think in video itself I give a demo of uploading to a folder. Check API documentation for how it can be uploaded to a folder.

    • @allison7324
      @allison7324 Рік тому

      @@RezaDorrani appreciate it! Thanks!

  • @MV-us8lw
    @MV-us8lw Рік тому +1

    Thanks, works like a charm!

  • @DroneEyes
    @DroneEyes Рік тому

    Another great and very useful video Reza ... thanks very much!

  • @user-ef5nv7jc5n
    @user-ef5nv7jc5n Рік тому +1

    Thanks Reza ,this is awesome. My question is can we add metadata from this request?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      No, since the API only supports uploading files (This is also what happens in a doc lib. You first upload a file and then set metadata). Once file is uploaded, you would need to get context of item and then fire another query to update the metadata.

    • @user-ef5nv7jc5n
      @user-ef5nv7jc5n Рік тому +1

      @@RezaDorrani Thank you very much 🙏

  • @srikanthb8549
    @srikanthb8549 Рік тому +1

    Hey Reza,
    Thanks for the awesome video.
    I have a ask here how to update the metadata of the documents uploaded?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      You would need to get context of item(file) created and then update metadata as a separate request. You cannot upload and update metadata with same api call.

    • @srikanthb8549
      @srikanthb8549 Рік тому

      @@RezaDorrani I have the context but how to update the metadata using office365groups httprequest.. in which parameter we need pass the body

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      I have not tried updating the metadata so do not know the specifics. You will need to check the graph api documentation for the same.

  • @voodoomanclothingco.3102
    @voodoomanclothingco.3102 Рік тому +1

    omg you are amazing! seriously, life saver!

  • @darmissservicedesk8744
    @darmissservicedesk8744 Рік тому +1

    Thank you Reza for this tutorial. What could be the problem? I am stuck in the enumerating of document libraries as it shows an empty date on value. I tried with different sharepoint sites and I the site ID is correct. Hope you can address my issue. Once again, thank you.

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      I think someone did run into a similar issue and may have mentioned the fix. It requires some service running on site. You would need to look through the comments.

    • @darmissservicedesk8744
      @darmissservicedesk8744 Рік тому +1

      @@RezaDorrani Thanks for the response. Appreciated it.

  • @Worrelpa
    @Worrelpa Рік тому +1

    Thanks reza, I had seen this method once or twice before. It's ust that 4mb limit is just a show stopper for me. If you have to worry about the file size uploaded. If there is a way to send that in chunks then that would be something.

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Thanks Phil!
      There is a graph api endpoint to upload large files as well (Upload large session - resuamble file).
      The resumable upload technique first requires a POST method to get the upload session link. Power Apps does not interpret the response as power apps is not aware of the response schema (will always return boolean true).
      So, we would have to call flow to interpret the response and get the URL to upload the file in byte sized chunks.
      This would be a complex process and better off to use flow to load the files.
      Important to note that power apps are designed keeping the mobile experience in mind. Uploading large files is not going to performant as all the work will be performed on the mobile device (performance + bandwidth challenges).

    • @Worrelpa
      @Worrelpa Рік тому +2

      @@RezaDorrani we just have scenarios where people would input data and provide documents / images as evidence. A lot of times people are out in areas where mobile connectivity is the only option. They end up emailing documents or worse third party doc storage which breaks the process.
      I see it as a graph limitation as opposed to Powerapps. A little increase to 10mb would cover a lot.
      Always grateful for you content Reza it explains ways of doing common things that business apps need to do but are not always straight forward to achieve.

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      @@Worrelpa I agree with at-least having 10 MB to work with.
      Thanks Phil for your kind words

  • @oluwatosinawobokun7804
    @oluwatosinawobokun7804 Рік тому

    Thank you so much Reza, you are an inspiration. I have a question. how can you upload files to the document library with metadata please?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Uploaded files does not have open to set metadata. First file has to be uploaded then metadata can be set.

  • @felixverduin569
    @felixverduin569 Рік тому +1

    Sick! That's very nice stuff Reza. Do I still need to add logic for duplicate files that are uploaded again in the SP doc library? Also, is it possible to add other metadata to the file via the graph api?

    • @RezaDorrani
      @RezaDorrani  Рік тому +2

      Thanks!
      You can always use the Lookup function to check if file already exists prior to executing the graph api call. Currently, if file is uploaded with same name, it will override the existing file (same as what SharePoint does).
      Video shows how to update the metadata via Power Apps. When uploading file, one cannot set metadata (similar to SharePoint behavior). Once uploaded metadata can be set via form control in Power Apps (As shown in video).

    • @felixverduin569
      @felixverduin569 Рік тому

      @Reza Dorrani I see, thank you for your answer. I skipped through the first part at first but looking back at it I see how you change the metadata after the file upload. Amazing Reza!

  • @-Einar
    @-Einar Рік тому +1

    Great video, Thanks! Is it possible to set status in the ForAll loop?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      When uploading document, setting properties is not possible.

  • @juancarlosmoralgonzalez1509
    @juancarlosmoralgonzalez1509 Рік тому +1

    Amazing, Reza!, as usual.. :)

  • @einfachmachengmbh
    @einfachmachengmbh Рік тому +1

    Great stuff! Can’t wait to try this out. I’m curious Is it possible to send values for columns in my document library? E.g. I have 3 text and three choice columns regarding the document that I want to „patch“ when uploading via graph api. Can I do this with the graph API call as well with parameters or something like that?

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      You cannot do that on upload of file. Can be done after file is uploaded however, we can straight out leverage the form control for that as shown in video.

    • @einfachmachengmbh
      @einfachmachengmbh Рік тому

      Okay. So giving my user the opportunity to for example assign the document to a project and status in powerapps via Dropdowns and sending his selection via graph api to the document library is not possible?

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      @@einfachmachengmbh Possible but only after doc is uploaded. Same behavior as SharePoint.

  • @necdetsaritas8722
    @necdetsaritas8722 Рік тому

    Learning continue... Thanks for the awesome lecture

  • @yehunlavolontededieu322
    @yehunlavolontededieu322 Рік тому +2

    Thanks Reza good thing somehow helps, Q: Can the user upload/create folder instead of single docs? IF yes , Is there size limit? IF not So , the only option is that they need to upload folders in the backend (doc-library)?
    I know It's a bit complicated as doc is involved, wish MSFT make a direct connection like list to manipulate the backend 😣pls MS do something, For my previous req The closest soln i found was from Andrew Hess , which meets my metadata gathering req with the doc, even that's more applicable only for single doc plus small size 10MG aint' doable.
    Now my req includes folder structure I mean not only display but also to create. Literally we wanted to mimic the whole doc library features in PowerApps so users don't need to access the backend. I think for now i better stick to the doc library not pull everything in PowerApps so i don't have worry about metadata /folder creation /size blalala ...

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Folder upload - No
      Small file sizes are the challenge with most of the approaches including the one I have showcased in emails. Power Apps is designed keeping mobile experience in mind - large file sizes is a definite challenge on mobile devices.
      There are APIs in graph to create folders and then add files in folders but all of them will have size limits.

    • @yehunlavolontededieu322
      @yehunlavolontededieu322 Рік тому +1

      @@RezaDorrani Thank you Reza for the speedy response. That's all I wanted to confirm before investing anything in it . Have a beautiful and blessed 2023 .

  • @ashutoshpandey1684
    @ashutoshpandey1684 Рік тому +1

    Thanks Reza, Great video. Only question I have here is it will not upload files larger than 50MB. Can you guide me any solution for larger files. Thank you

    • @RezaDorrani
      @RezaDorrani  Рік тому

      There is a graph api endpoint to upload large files as well (Upload large session - resuamble file).
      The resumable upload technique first requires a POST method to get the upload session link. Power Apps does not interpret the response as power apps is not aware of the response schema (will always return boolean true).
      So, we would have to call flow to interpret the response and get the URL to upload the file in byte sized chunks.
      This would be a complex process and better off to use flow to load the files.
      Important to note that power apps are designed keeping the mobile experience in mind. Uploading large files is not going to performant as all the work will be performed on the mobile device (performance + bandwidth challenges).

    • @muthusamythangavel3985
      @muthusamythangavel3985 Рік тому

      @@RezaDorrani What is the max file size we can upload it to Sharepoint (through power automate or graph api). In DV it's around 128 Mb (i have increased max file attachment size upto 128MB in environment advance settings) but i don't know that will support for Sharepoint also
      Could you help me on that??

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@muthusamythangavel3985 Dataverse file size has nothing to do with SharePoint. The graph api has a limit and I have that mentioned in video. I will recommend checking on forums in case someone has a workaround powerusers.microsoft.com/

  • @cesarb1543
    @cesarb1543 Рік тому +1

    You're Great, thank you for share!

  • @jray1429
    @jray1429 Рік тому +1

    Reza, great work!!
    Now I just have to figure out how to copy files. I’m trying to make it so users don’t have to manually upload the same file again when the second “project” is referring to that project.
    One of my biggest problems I have though is when a user download a file via a link using download and not launch, edge may respect it and download it and chrome may still launch it. I don’t want the user to overwrite the original file and when it launches, it allows them to edit it. They could “save as” on their computer, but that will be forgotten by many users.
    Is there anyway that I can make it so that they can’t edit the original file by forcing it to download and not allow it to launch❓ Also, with downloading, they don’t easily see the actual file location either.

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Thanks Ray.
      Your scenario is not something I have come across or tried out. So not sure what the possibilities are. Reality is user will need access to SharePoint and nothing stops a user from taking these actions in SharePoint- uploading file with same name which would override.

  • @MrHaider2003
    @MrHaider2003 4 місяці тому

    Hello @Reza,
    any insights on what's max file size limit when uploading file using this method or using power automate?

    • @RezaDorrani
      @RezaDorrani  4 місяці тому

      I have called it out in this video.
      Power Automate allows higher file sizes.

  • @rembautimes8808
    @rembautimes8808 Рік тому +1

    Great video thanks for sharing

  • @_sai_teja
    @_sai_teja 8 місяців тому

    Hey Reza, Very Informative
    Can we upload the file and update the metadata at the same time?

  • @MrGaztab
    @MrGaztab Рік тому +1

    Great video, thank you.

  • @robertadincalevis3800
    @robertadincalevis3800 Рік тому +1

    Hi Reza, thank you, again, for your videos!! Many people would be lost without you.
    I believe I have to consent for permissions to see the drive id, because my query gives me an empty value as a result. Am I correct? Which permission should I consent to to being able to see the id of my library?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      In graph yes. It uses your identity.

    • @urosgabrovec
      @urosgabrovec Рік тому +1

      I am also experiencing a similar issue. I logged into the Microsoft Graph using the same user account that is the owner of the SharePoint site and has full control over the document library. However, I am still receiving empty results when trying to retrieve the drive ID. The document library does not have broken permissions, and the site ID should be correct (I also tried obtaining the site ID using PnP, and it was the same).
      Does anyone have any suggestions on what could be causing this issue?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@urosgabrovec check video comments. Someone did post something related to it.

  • @lipabera9729
    @lipabera9729 11 місяців тому

    Hi Reza, great video again. thanks for this. I want to know how can we make the Graph api endpoint dynamic. Basically the document library id, is there a way it can be made dynamic?

    • @RezaDorrani
      @RezaDorrani  11 місяців тому

      You could call graph api to get libraries, list it in dropdown. User can select and based on the selection pass that document id. That would be one way.

  • @nikkijoy226
    @nikkijoy226 Рік тому +1

    Thank you, thank you, thank you 😊

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      You are so welcome!

    • @nikkijoy226
      @nikkijoy226 Рік тому

      @RezaDorrani do you have a video for a multi-level document approval process where the 2 levels of approvers change with each document? Selecting a manager from Office 365 doesn't work for me since the approvers aren't managers or in specific departments
      Thank you

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      @@nikkijoy226 I don’t remember having a video on this topic

    • @nikkijoy226
      @nikkijoy226 Рік тому

      @@RezaDorrani thanks for responding so quickly. I'll keep looking. My problem is getting the flow to send the email to a chosen recipient by I keep getting errors

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      @@nikkijoy226 Best place to post issues is the forums at powerusers.microsoft.com

  • @MsMartin360
    @MsMartin360 Рік тому +1

    Thanks Reza for the idea.
    Is there any possible option to update file properties while performing the Upload action?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      Not possible with upload function.
      It would have to be a separate function call after upload is performed.

    • @MsMartin360
      @MsMartin360 Рік тому

      @@RezaDorrani I have had the opportunity to implement this concept in my project, and it works fine. However, when it comes to the Desktop player, Upload action is not working. Do you have any ideas or suggestions on how to resolve this issue?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@MsMartin360 I have not tested with desktop player hence not sure what the fix would/could be.

    • @MsMartin360
      @MsMartin360 Рік тому

      @@RezaDorrani Hi, I finally found the solution. We need to use "Text(ThisRecord.Value, Language())". Thank you for your support.

  • @trendingplaylist3253
    @trendingplaylist3253 Рік тому

    Hi Reza, do you have a video showing how to update file properties on an uploaded file on a document library? Thanks!

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      I don’t think I do

    • @WhyNot-gc7vf
      @WhyNot-gc7vf Рік тому

      @@RezaDorrani but is that even possible? i was able to come up with a work around using a secondary action to update the properties using UpdateIf :)

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      @@WhyNot-gc7vf You would need to execute a patch or updateif after the file upload action is performed. There is no option to upload and set properties in a single action. Even in SharePoint when you upload a file - first SharePoint uploads the file - then it opens the properties panel.

    • @WhyNot-gc7vf
      @WhyNot-gc7vf Рік тому +1

      @@RezaDorrani That is exactly what I did...your videos are always very useful! thanks again

  • @mathiskoppx7848
    @mathiskoppx7848 Рік тому +1

    Hi, Reza as always, your video was just what I was looking for!! I just face one issue: I can not seem to find a way to rename the file in the attachememt control. I want to avoid using a flow to do this, and the method you used for tagging lists attachements does not work for libraries [ClearCollect(Defaults(datasource).Attachements)]. The reason I need to rename the files, I.e. make them unique is because if there is a file with the same name, it will be overwritten without any notification if I use the Graph API. Is there a way to fix this? Would really appreciate some help since I could not find a solution online!

    • @RezaDorrani
      @RezaDorrani  Рік тому

      This video is about uploading files to document library and not list item attachments. I have done other videos on list item attachments and renaming them. You can check those.

    • @mathiskoppx7848
      @mathiskoppx7848 Рік тому

      @Reza Dorrani Yes, but you are using an attachment control to upload to a sharepoint document library, so I thought it might be possible to apply your tagging method from your other videos to this case. Or do you know any way to change the name column of a document library using power apps?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@mathiskoppx7848 Attachment control is only to upload files. Video shows how file is uploaded and name is added. You can easily add logic to update it. Check my other videos to get an idea.

  • @oluwatobipaul6171
    @oluwatobipaul6171 Рік тому +1

    Awesome video Reza

  • @sonakification
    @sonakification Рік тому +1

    Hi Reza, this is very nice and elegant solution however would it be possible to tag each file before we upload to sharepoint? We are working with drawings and each have a unique number. Currently I have parse json in power automate and form control in power apps. Could we tag this attchments before we upload them to sharepoint with graph api? Many thanks Norbert

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      You cannot upload and tag at same time. You can take user inputs for properties, first upload and then Patch an update to its properties.

    • @sonakification
      @sonakification Рік тому +1

      @@RezaDorrani thank you much appreciated!

  • @franciscocartesfuica9944
    @franciscocartesfuica9944 Рік тому +1

    great video!

  • @walesbe1028
    @walesbe1028 9 місяців тому

    Hello Reza. Great contenet as always. However the action HTTPRequest has been deprecated and the V2 released. Your solution doesn't seem to work with the V2 connector. Do you know what need to be modfiied to make it work ?

    • @RezaDorrani
      @RezaDorrani  9 місяців тому

      I did 4-5 videos on graph api showing many different techniques. Check the videos released 3/4 weeks range after this video.

  • @guillermomartingaray4092
    @guillermomartingaray4092 Рік тому

    Hello Reza, the video and the explanation are great, my only question is, do you need any premium functionality to be able to do this?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      custom connector is a premium feature

  • @srikanthpaladugu1728
    @srikanthpaladugu1728 Рік тому +1

    Appreciated work 👏

  • @olivergrobs349
    @olivergrobs349 Рік тому +1

    My first thougt: I must include this in my project. But at the last minute I was disillusioned by the 4MB limit. I can‘t understand, why Microsoft is limiting this..

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      I wish the limits were more. Atleast 10MB

  • @alzaimoor79
    @alzaimoor79 Рік тому +1

    Thanks, great video

  • @brunoplacha
    @brunoplacha Рік тому +1

    Hello Reza, Thanks for the amazing video. When I try to find the library ID using the Grafh explorer, it returns me the Microsoft graph website address instead of my SharePoint one. do you know why?

  • @LAAatBLS
    @LAAatBLS 8 місяців тому

    Hi, @rezadorrani. Excellent content, as always. How do you set document library properties or column values using this method for document uploading? Also is there any way around the MB limit? Or could you get the list ID or document ID as a return value?

    • @RezaDorrani
      @RezaDorrani  8 місяців тому

      You cannot upload and set properties for doc library. First one has to upload the document and later can set properties.
      There is no workaround the MB limit for this api.

  • @basehumax
    @basehumax Рік тому +1

    Hi Reza, as always, very interesting solutions. One question I do normally use patch to save my records to SharePoint list, is it possible to add this solutions at end of my patch and the attachment will save on same record just patched? 🙏

    • @RezaDorrani
      @RezaDorrani  Рік тому

      This video is related to document libraries. You are trying to attach items to SharePoint lists. I have done multiple (4+) videos on uploading files to list item attachments. Check my playlist on list item attachments.

    • @basehumax
      @basehumax Рік тому

      Thanks replying, my question was to save the attachment with my records to SharePoint list using API Graph and patch is it possible? NOT FLOW

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@basehumax Check my videos - I have shown how to do that without flow. It uses form control. Patch does not support attachments.

  • @JeanJacquesQuang
    @JeanJacquesQuang Рік тому +1

    Hello Reza, great video tutorial!
    Was able to achieve as per your tuto.
    One additional question: is it possible to upload in subfolder of root, but dynamic using item title as reference? As I already created subfolder with title as folder name? Thank you for your input. Jack

    • @RezaDorrani
      @RezaDorrani  Рік тому

      I think I mentioned in video that subfolder is possible. So I would say Yes.

    • @JeanJacquesQuang
      @JeanJacquesQuang Рік тому

      @@RezaDorrani Hello Reza, indeed, you mentioned it is possible, with created folders. But any possibility to refer to dynamic field such as item title?your hint is appreciated. Best.

    • @RezaDorrani
      @RezaDorrani  Рік тому

      @@JeanJacquesQuang Possible. You simply concatenate the title in it. Check concatenate function in power apps.

    • @JeanJacquesQuang
      @JeanJacquesQuang Рік тому +1

      ​@@RezaDorrani Reza, thank you very much for the hint! I'll look into it with concatenate function. I see it now! Great. Thanks again.
      Please keep your fabulous videos. Jean

  • @bg-jr3yz
    @bg-jr3yz Рік тому +1

    Great, thank you!

  • @kendrayoder7171
    @kendrayoder7171 Рік тому

    Thank you Reza! I recommend your videos to anyone on any level working with Power Apps! A couple questions. (1) Using this method, can a guest user who is not employed in our company submit uploads? (2) Is it possible for app users (including guest users) to submit form data to a list and uploaded files to a Sharepoint library if I don't grant access to the Sharepoint site? I'm building an award nomination app. I want nominators to be able to submit nominations and supporting documents, but for obvious reasons I need this to be completely secure and accessible only to the award administrators. Can this be done?

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      Thank You!
      1 - Gues users can be added to power apps. They would also need access to SharePoint. Can be done.
      2 - Access must be granted to users on SharePoint. There is no impersonation action.
      May be look at this one - ua-cam.com/video/ts-ggDAy7IQ/v-deo.html

    • @kendrayoder7171
      @kendrayoder7171 Рік тому +1

      @@RezaDorrani Thank you Reza for replying so quickly! I'll take a look at the link! Thank you for this and all your other incredibly helpful videos!! :)

  • @nduagubadev
    @nduagubadev Рік тому

    Good one reza, can it also work on the root site collection, can it also work on any site collection

    • @RezaDorrani
      @RezaDorrani  Рік тому

      It can work on any site collection

  • @user-ts7lj3bi6s
    @user-ts7lj3bi6s 11 місяців тому

    Hi Reza, I wanted to also patch some details like ID, etc from the gallery from where I upload the attachments to the document library. Anyway by which I can do this ?

    • @RezaDorrani
      @RezaDorrani  11 місяців тому +1

      ID is an internal column and cannot be patched.
      First you have to upload file with api shown in video.
      You would need to then fire a second query to patch. Check graph api documentation on how to update file properties

    • @user-ts7lj3bi6s
      @user-ts7lj3bi6s 11 місяців тому

      @@RezaDorrani Thanks Reza. Let me try this out.

  • @user-bx7cc2jb9t
    @user-bx7cc2jb9t Рік тому

    Hi Reza,
    When I needed it most, this video saved the day. I appreciate your thorough explanation, which made the learning process go smoothly. On the basis of best practices and an effective screen run, I have a question for you. I must save my submitted files in a document library and I have five upload controls on one screen linked to a SharePoint list. All that is left for me to do at this point is to push all of the uploaded files to the library after the form has been submitted (in separate 5 fns because the controls are different). Is it advisable to include everything in the Submit button's OnSelect property? What are your recommendations?

    • @RezaDorrani
      @RezaDorrani  Рік тому

      You can submit them on click of single button one after the other. Big challenge is that the response is a problem as you would not know if it succeeded or not.
      My next video will show something new which would help in evaluating the response.

    • @user-bx7cc2jb9t
      @user-bx7cc2jb9t Рік тому

      @@RezaDorrani Thanks for the response. I look forward as always for your next video. I tried to upload file and ended up in a run time error. How can we identify the reason behind response error?

    • @RezaDorrani
      @RezaDorrani  Рік тому +1

      As I said, the response does not give any information. Wait for my next video

    • @user-bx7cc2jb9t
      @user-bx7cc2jb9t Рік тому +1

      @@RezaDorrani Yes sure. Always