Share via

Using Azure function in MS Flows to create a SharePoint folder

Anonymous
2017-07-11T18:33:17+00:00

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.

Thank you in advance.

Ginny

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2017-07-13T09:35:37+00:00

Hi Ginny,

Thanks for your reply.

Since the error message based on your screenshot indicates that you have a Flow related issue, we suggest you post this to Flow communityfor dedicated support.

Your understanding is highly appreciated.

Tisky

Was this answer helpful?

0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2017-07-13T11:50:55+00:00

    Hi Tisky,

    I will do, thank you for your help.

    Regards,

    Ginny

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2017-07-12T15:29:42+00:00

    Hi Ginny,

    Based on your description, when you use the Flow app, it returns an “Unauthorized” error. You can follow the steps below then check whether the problem still persists.

    1. At the top of the web portal, click or tap the gear icon to open the Settings menu, and then click or tap Connections.
    2. Scroll to the connection for which you saw the Unauthorized error message.
    3. Next to the connection, click or tap the Verify password link in the message about the connection not being authenticated.
    4. Verify your credentials by following the instructions that appear, return to your flow-run failure, and then click or tap Resubmit.

    Regards,

    Tisky

    Hi Tisky,

    Thank you for your response.

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

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

    Am I still missing something else perhaps?

    Thanks

    Ginny

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2017-07-12T02:34:51+00:00

    Hi Ginny,

    Based on your description, when you use the Flow app, it returns an “Unauthorized” error. You can follow the steps below then check whether the problem still persists.

    1. At the top of the web portal, click or tap the gear icon to open the Settings menu, and then click or tap Connections.
    2. Scroll to the connection for which you saw the Unauthorized error message.
    3. Next to the connection, click or tap the Verify password link in the message about the connection not being authenticated.
    4. Verify your credentials by following the instructions that appear, return to your flow-run failure, and then click or tap Resubmit.

    Regards,

    Tisky

    Was this answer helpful?

    0 comments No comments