Hi,
I'm building a custom page embedded on a model driven where you can upload a file to azure blob storage using the stard connector with the authentication type:"azure Ad integrated". the issue I'm facing is when I try to launch CreateShareLinkByPathV2 it says:
Launch(
AzureBlobStorage.CreateShareLinkByPathV2(
"storage",
"container/file/"
).WebUrl
)
I checked the documentation but I couldn't find anything about this error. I can't change the type of authentication of the connector. There is any other solution?? there are any other function I can use for download the file??
thanks in advance
Hi @NativeNass_ ,
Apologies for the delayed response, but I wanted to share some insights that might prove helpful, especially for others encountering similar challenges.
After extensive testing and implementation, we successfully resolved the issue with the application we discussed earlier. The solution involved granting users specific privileges to contribute to the Blob storage (we have done it from Azure and If I remember correctly it was a role)
To streamline the file upload process, here's the code snippet you'll need. Ensure to include the necessary parameters such as the Azure account, container, and of course, the file itself. (Note: I've utilized components to enable users to attach files seamlessly.)
// Create a file in Azure Blob Storage
AzureBlobStorage.CreateFileV2(
varBlobStorage.Account,
varBlobStorage.Container & "/Import",
First(FileAttachment_2.Attachments.FileAttachment).Name,
First(FileAttachment_2.Attachments.FileAttachment).Value
);
The documentation of MS it is a bit old(this one https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/connections/connection-azure-blob-storage) most of the actions have been deprecated and substitute with a new version.
The only point where I could find the new actions it is in the documentation for Power Automate, but the actions are the same for powerapp sometime they have the name a bit different (https://learn.microsoft.com/en-us/connectors/azureblob/).
I hope it can help
HI @Lorenzo6
Been having to work on a project as well with the Blob connector and you can only use these specific steps when you have access/key authentication.
If you cannot change the connection in your PowerApp it might be an idea to launch a flow that creates the SAS URI and return it to your app?
However, you will also need to configure the connection in your flow with access/key as well.
Since your post has been a while, found any way around this? I'm also trying to return the file content from flow to canvas apps so that I don't have to create this SAS URL.
Kr
WarrenBelz
770
Most Valuable Professional
stampcoin
494
MS.Ragavendar
399