June 17, 2021

[Resolved]: Different issues and their solutions while publishing InfoPath form to SharePoint Online environment.

        Introduction

        We performed the migration of the InfoPath forms from SharePoint On-Premises to the SharePoint Online environment using InfoPath designer for a Postal and Parcel company based out of Melbourne, Victoria, Australia. Wupdated the InfoPath form as per the online version, but when we start publishing the form, we encountered some issues.

        In this blog, we will learn about these issues and the solutions which we encountered while publishing the InfoPath form. 

        Scenario

          • We had an InfoPath form with multiple data connections. 
          • First, we changed the data connections according to SharePoint online environment then we publish the form to a SharePoint library but when we tried to publish the InfoPath form for the first time, we faced and resolved these issues. 

          Issues and Solutions

          Problem 1: 

          • When we publish the InfoPath form at the end of the Publishing wizard it shows an alert box as “InfoPath cannot save the following form: form name. This document library was either renamed or deleted... 
          • This issue was detected when we tried to publish the form for the first time.
          • The issue is "The library is either renamed or deleted..." even if the library is correct in SharePoint online.
           

          Solution: 

          • To resolve this issue, we need to make changes to the server from where we are trying to publish the InfoPath form template. 
          • We have to add the "Desktop Experience" feature in the server manager. 
          • The issue occurred because the "Desktop Experience" feature is responsible for the connection between the SharePoint server and the window server while publishing an InfoPath form and it was not installed in our system. 

          Steps to add the "Desktop Experience" feature

          Step 1: 

          Open server manager and click on the "Managetab from the top ribbon and choose the "Add Roles and Features" option as shown below. 


          Step 2: 

          • It will open the “Add Roles and Features Wizard”. 
          • Here, in the "Features" section we have to expand the "User Interface and Infrastructure" and select the "Window Experience" feature and after completing the steps of this window we need to restart our server. 


          Now the error will be resolved and we will be able to publish the InfoPath form.

          Problem 2  

          Sometimes we detect this issue. 
          • When we publish the InfoPath form, at the end of the Publishing wizard it shows an alert box as InfoPath cannot save the following form: form name. Access Denied...". 
          • This issue occurs when we try to publish the form for a site that is not a trusted site in our system. 


          Solution: 

          • To resolve this issue, we have to add the targeted site to the "trusted sites". 

          Steps to add a site to the trusted sites  

          Step 1: 

            Open the  Internet Explorer and click on the "Internet Options" as shown below.
             

            Step 2: 

            • Click on the "Security" tab, then open "sites" as shown below. 
            • It will open a window where we can add our site and make it a trusted site.

            Now the error will be resolved and we will be able to publish the InfoPath form.

            Conclusion: 

            This is how we can resolve these issues and publish the InfoPath forms successfully. Hope this will help you.

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

            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.