web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Azure function in MS F...
Power Automate
Unanswered

Azure function in MS Flows to create a SharePoint folder not working - Help Please!

(0) ShareShare
ReportReport
Posted on by 4

Hi,

 

I've recently created my first ever Office 365 SharePoint online site for a company I'm currently working for, and whilst I can find my way around based on knowledge using SharePoint 2010 (but just as a user), I am building everything from scratch.  Everything is going ok so far and I've read articles on the MS Community regarding using Azure functions to ask SharePoint to create a folder when in MS Flows.  I need this function to work given what I'm asking it do.  For example, I've set up an online form in InfoPath and published it to a SharePoint List, and then in MS Flows I'm asking it to:

 

1.  When I new item is created in the SharePoint List

2.  Send an email with options i.e. to approve, decline or further detail required

3.  If approved, a new folder is to be created in a specific document library using one of the dynamic field options that I pre-selected from the newly created form

 

The problem is that having tested the workflow some 10 times, when it comes to creating the new folder using the Azure function app that I've created, it keeps coming up with 'Unauthorized'.

 

I've gone into my function app and checked the authentication and checked that its turned on and it is, but I don't know what else I need to be looking for or what I've missed.

 

Being a novice at this, I'm using learning material to get this up and running so any help would be really appreciated as I need this 'create folder function' to work; it's a huge part of the main process and why we are using SharePoint in the first place - to automate processes.

 

I've checked the Flow portal, and gone down the connections to the one I want and it says "Connected". See screen shot below.

 

Image

 

When I open the 'failure' on the flow-run to see the 'outputs' it says this:

 

Image

 

Can anyone please as I don't know what I've done wrong.

 

Thank you in advance.

Ginny

Categories:
  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @GinnyV,

     

    Could you please share the article that you followed to create the Azure Function?

    Is it the following one?

    How to call SharePoint from Microsoft Flow with the help of an Azure Function

    If not, then please follow the steps mentioned in the article above to check your function, specially for the 

    "add ‘SharePointUser’ and ‘SharePointPassword’ properties" part.

    The error message should mean the Azure function don't have the proper rights to create folder under SharePoint online library.

     

    Regards,

    Michael

  • GinnyV Profile Picture
    4 on at

    Hi Michael,

     

    Thank you for your response.

     

    Yes it is that article that you mentioned in your response, which I have printed out and gone over with a fine tooth combe.  That said I will go over everything again to triple, triple check in case my eyes have missed something as everything is new to me.

     

    I'll let you know how I get on

     

    Regards,

    Ginny

  • GinnyV Profile Picture
    4 on at

    I've followed the procedure again from scratch and set up a brand new connector in Flows and checked that it is 'connected' which it is. I've run the flow again, and I'm still getting 'Unauthorised'.  The message below comes up on the side of the screen.

     

    Action 'Create Folder' failed

    Fix It

    You should be able to fix this by verifying your account with SharePoint Azure Functions. You may need to re-enter your password.

    Error type

    This action failed because the connection 'SharePoint Azure Functions' is not authorized.

     

    I'm already 'connected' for the custom connector so no idea what to do now or to check!

     

    Any further help or suggestions are greatly appreciated.

     

    Regards,

    Ginny

     

     

     
  • anton-khrit Profile Picture
    197 on at
    Hi,
     
    You can easily create SharePoint folders and a few subfolders at a time in Microsoft Flow with the help of Plumsail Actions.
     
    It has Plumsail SP connector that provides a set of actions for SharePoint management, including creating, moving, copying folders cross-site.
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 227 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 213 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 151

Last 30 days Overall leaderboard