1
votes

I'm trying to send a REST call (POST) from a Logic App in Azure to Sharepoint, to create a documentlibrary for a given contact.

This is what the HTTP connector looks like in my Logic App:

Logic App

What I primarily need help with is the OAuth authentication in order to send this REST call. What do the following attributes mean in this context, what would be an example for each one, and how would I go about finding my proper values for my situation?

Tenant
Audience
ClientID
Secret

(Also, If anyone has a good suggestion for what Uri/body i should use to accomplish this POST call, that would also be very helpful.)

1
Is there a good reason not to use the native sharepoint connector instead? Anyway, you can find documentation here: docs.microsoft.com/en-us/azure/scheduler/… (Azure Logic Apps share the same outbound Auth definition model as Azure Scheduler)Szymon Wylezol
@SzymonWylezol I believe the native connector does not support creating folders in Sharepoint yet. It would have made things very easy. Thanks for the link, I'll check it out!vili_

1 Answers

0
votes

Indeed, you can call SharePoint Rest API with Azure Logic Apps and AzureAD secured OAuth authentication. What you mainly miss is a certificate.

Create it like described here for instance.

Then you need the following parameters in your HTTP request:

  • Tenant: YourTenant.onmicrosoft.com
  • Audicence: https://YourTenant.sharepoint.com
  • ClientID: GUID of your registered Azure App registration
  • Credential Type: Certificate
  • Pfx: Your whole certificate as Base64Encoded string (for simplicity open with Notepad++ and conver to Base64 via Mime Tools)
  • Password: The Password to your certificate

That way it worked for me. Next step would be for sure to securely treat the parameters such as your Base64 certificate, the password, or even the Guid of your app registration.