June 10, 2021

How to implement SharePoint CRUD Operation using Power Automate?

Introduction

In this article, we will talk about how we can Create, Update and Delete data using “Send an HTTP request to SharePoint” Action in Power Automate. 

Real-Life Business Use Case:

We all know with OOTB Power Automate action - “Send an HTTP request to SharePoint” we can perform SharePoint CRUD operations easily. However, sometimes, there are situations where we need to set up one flow for a different site. For this scenario, we need to pass Site URL and List Name Dynamically. At that time, we can use OOTB Power Automate action - “Send an HTTP request to SharePoint” and pass Site Name and List Name dynamically. In this article, we will see the most used methods, such as GET, POST, PATCH, and DELETE with examples.

Prerequisites:

Log in to the flow portal with your Office 365 credentials.
For this article, we have created two SharePoint List. One is for Training and the second List for PostData

Overall Architecture/Schema of Lists:

Below is the column structure of the Training List.
 
Below is the column structure of the PostData List.
 
Now, let’s get started with development procedure!

Step 1:

Add Manual Trigger. We can choose trigger based on business need.

Step 2: 

Initialize variables for site URL and list name.

Step 3: Get Items

Click on New Step and add an action “Send an HTTP request to SharePoint”. 
    • Site Address: Choose your SharePoint Site from the dropdown.
    • Method: Select “Get”
    • Uri: _api/web/lists/getbytitle(“List Name”), other attributes like a top, filter, etc can be added here.

Step 4: Create Item 

Add “Send an HTTP request to SharePoint” action.
  • Site Address: Choose your SharePoint Site from the dropdown.
  • Method: POST
  • Uri: _api/web/lists/getbytitle(“List Name”)
  • Headers: In the case of a post we need to add a header. In the Headers section, there is a key-value pair combination.
    • content-type :application/json;odata=verbose
    • If-Match :  *
  • Body: JSON body as per business requirements.
     {  
     "__metadata": { "type": "SP.Data.PostDataListItem" },  
     "Title": "New Demo User Post",  
     "Score": 2 ,  
     "TrainingId": 4    
     }  
    
Note: The body part will have a schema of the list item you want to create. Make sure you are including all mandatory columns in the schema. Now, run the flow and check the result.
Success code: 201 means our post method completed successfully. Now we will verify the SharePoint list to check.

Step 5: Update Item

To Update the existing item, we need to use Patch method. Add an Action “Send an HTTP request to SharePoint”.
  • Site Address: Choose your SharePoint Site from the dropdown.
  • Method: PATCH
  • Uri: _api/web/lists/getbytitle(“List Name”)(ItemID) , id of item which will be updated
  • Headers: In the case of a post we need to add a header. In the Headers section, there is a key-value pair combination.
    • content-type :application/json;odata=verbose
    • If-Match : *
  • Body: JSON Body as per the business requirements.
     {   
     "__metadata": { "type": "SP.Data.PostDataListItem" },   
     "Title": "New Demo",   
     "Score": 2 ,   
     "TrainingId": 4   
     }  
    
Success code: 204 means we have successfully updated the specific list item. Now let’s verify the list item.
We can see that the User Department is updated to HR from IT for Demo User 1.

Step 6: Delete Item

Add an Action “Send an HTTP request to SharePoint” in our existing flow. 
  • Site Address: Choose your SharePoint Site from the dropdown.
  • Method: DELETE
  • Uri: _api/web/lists/getbytitle(“List Name”)(ItemID) , id of item which will be updated
  • Headers: In the case of a post we need to add the header. In the Headers section, there is a key-value pair combination.
    • content-type :application/json;odata=verbose
    • If-Match : *
    • X-Http-Method: DELETE
We are going to target the Item id 4 to delete using the action “Send an HTTP to SharePoint”. Now, run the flow and check the result.

Conclusion:

This is how we can easily implement CRUD operations for SharePoint List item using Power Automate. Isn’t that amazing?
If you have any questions you can reach out our SharePoint Consulting team here.

June 3, 2021

How to disable Multifactor Authentication at Tenant Level in Office 365?

Introduction:

In this blog, we will see how we can disable Multifactor Authentication (MFA) at Tenant Level in Office 365.

You might face an issue, that even after disabling MFA from Office 365 admin center, it is asking for multifactor authentication while login. In this scenario, follow below steps to disable the MFA:

Steps:

Step 1: Go to https://portal.azure.com.

Step 2: Now go to the Azure Active Directory.


Step 3: Under Azure Active Directory, search for "Properties" on the left-hand panel. It is in-between of User Settings and Security.


Step 4: Under the Properties, click on Manage Security defaults from the very bottom.


Step 5: On clicking, it will open a panel on the right side. Now select No in Enable Security defaults toggle and select an appropriate reason for disabling security from given options. Click on Save.


Step 6: Now try to login after few minutes, it will not ask for multifactor authentication.

Conclusion:

This is how we can disable Multifactor Authentication (MFA) for Office 365 at tenant level.

If you have any questions you can reach out our SharePoint Consulting team here.

May 27, 2021

SharePoint 2019 FBA Setup - "fullName" Error

Introduction

Recently we have set up Form based authentication (FBA) in SharePoint 2019 environment for a washing company based at Milan, Italy. We have configured the FBA with best practice but when we try to login using windows user or FBA user,  we were getting error – “Fullname”.

Issue

We faced below error when we try to login using windows user or FBA user:


Solution:

We have checked multiple blogs in google and verified that the set up was done using best practice. So, our doubt goes to configuration in web application, and we found out that “Client Integration” settings is responsible for this.

To disable the “Client Integration” settings follow below steps:

  • Go to Central Admin.
  • Click “Manage web application” under “Application Management”.



  • Select your web application.


  • Click on “Authentication provider” from Ribbon.


  • It will show default Zone. Click on that.


  • Scroll bottom of the authentication provider settings dialog.
  • Click “No” for “Client Integration” Settings.


  • Click Save.
  • It will take some time and provide below dialog. Click close.


  • Now try to login in web application. You will see the user is able to login successfully.

If you have any questions you can reach out our SharePoint Consulting team here.