cancel
Showing results for 
Search instead for 
Did you mean: 
jatinchandra
Nintex Newbie

How to Create an SPList using Ninxtex Workflow for Office365

Hi there,

I'm trying to create an SPList in SharePoint using Nintex Workflow for Office365. As there is no direct Action available in Nintex for Office 365, I've used REST API to do the same. I followed the steps as said in the below article.

Using the Office 365 REST API to create lists from your Nintex Workflow.

But I ended up with Access denied error as below.

Response Content : {"error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have permission to perform this action or access this resource."}}}

Response Status Code: Forbidden

Can someone help me to get over this?

My requirement is to Create a Sub-Site & few SPLists as requested by End-users(by filling up a form). I'm able to Create a Sub-Site as there is direct action. For creating Lists, I'm using REST API which I could not succeed. Since this a very common requirement, I'm expecting there should be a way of doing it without much difficulty.

Thanks in advance.

Regards,

Jatin Chandra.

0 Kudos
Reply
2 Replies
Community Manager Community Manager
Community Manager

Re: How to Create an SPList using Ninxtex Workflow for Office365

My recommendation would be to attempt creating the list using a tool like Postman first to ensure you have everything set up correctly for that. Once you've done that you can bring the format for the web service call back into Nintex and see if it works. 

 

Creating a list via a REST call should be doable, but you will have to ensure you have the correct headers and permissions to achieve such via the API.

0 Kudos
Reply
DAGiessenburg
Nintex Newbie

Re: How to Create an SPList using Ninxtex Workflow for Office365

Like @eharris04 is saying, use a tool like Postman (https://www.getpostman.com/) to see if your call is correct.



Al good practice is to use App passwords or register an app in you azure portal.

If you have registered an app: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app

 

  1. Call the token service for an Bearer token: https://login.microsoftonline.com/{{tenantId}}/oauth2/tokenWith the following body: grant_type:"client_credentials"
    client_id {{app id}}
    client_secret: {{app secret}}
    resource: https://manage.office.com
  2. Call the sharepoint service met header: Authorization: Bearer {{token service 1}}

 

 

 

 

Reply