Use the SharePoint workflow to copy column contents to another list

Do the columns have to be the same format when creating a workflow to copy content from one list to another?

Background: I have already created a workflow to copy column information from one list to another once the entry in the source list has been approved. With the exception of one column, everything works fine. The columns in the source and target lists are identical with one exception. I have a column in the source list that uses a search (from another list) and the same column needs to be set in text format in the target list. I need this target list column in a text format so that it is available as a reference book in an infopath form for a third list (in which observation data is collected).

If this particular column between the list had the same format (ie the search in one list was also set up with the same search in the other list), the content of this column was copied without problems. If both lists are set up in this way, the contents of this column will not appear as a search in the third list used for data collection and will require you to enter these columns as a selection.

In the current configuration, I have no problem copying and pasting the missing column data from the source list into the target list manually, even though the columns do not have the same format (search in the source list and text in the target list). I'm not sure why I can't get the workflow to do this for me.

Any support would be greatly appreciated.

sharepoint online – A remote event receiver attached to a list cannot be removed with Remove-PnPEventReceiver. Emove-PnPEventReceiver: Access Denied error.

I have a remote event receiver attached to a list. So I want to remove it, but when I try this PnP script with the Office 365 administrator: –

Remove-PnPEventReceiver -List "Our Project"  -Identity "ProjectRER"

I have the following exception: –

Remove-PnPEventReceiver: Access denied. You don't have permission to do so
Perform this action or access this resource

I also try this: –

Connect-PnPOnline -Url *** -AppId *** -AppSecret ***>
Remove-PnPEventReceiver -Identity "ProjectRER"

but I have the same exception. Here is the code that the RER has attached to our app hosted by the provider: –

public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties)
        {
            SPRemoteEventResult result = new SPRemoteEventResult();
            if (properties.EventType == SPRemoteEventType.AppInstalled)
            {
                using (ClientContext clientContext = TokenHelper.CreateAppEventClientContext(properties, false))
                {
                    if (clientContext != null)
                    {
                        //Get reference to the host web list with name Feedback
                        var documentsList = clientContext.Web.Lists.GetByTitle("Project Update System");
                        clientContext.Load(documentsList);
                        clientContext.ExecuteQuery();
                        string remoteUrl = "****.svc";
                                                  //Create the remote event receiver definition
                        EventReceiverDefinitionCreationInformation newEventReceiver = new EventReceiverDefinitionCreationInformation()
                        {
                            EventType = EventReceiverType.ItemUpdated,
                            ReceiverAssembly = Assembly.GetExecutingAssembly().FullName,
                            ReceiverName = "***",
                            ReceiverClass = "***",
                            ReceiverUrl = remoteUrl,
                            SequenceNumber = 15002
                        };
                        //Add the remote event receiver to the host web list
                        documentsList.EventReceivers.Add(newEventReceiver);
                        EventReceiverDefinitionCreationInformation newEventReceiver2 = new EventReceiverDefinitionCreationInformation()
                        {
                            EventType = EventReceiverType.ItemUpdating,
                            ReceiverAssembly = Assembly.GetExecutingAssembly().FullName,
                            ReceiverName = "***2",
                            ReceiverClass = "**2",
                            ReceiverUrl = remoteUrl,
                            SequenceNumber = 15001
                        };
                        //Add the remote event receiver to the host web list
                        documentsList.EventReceivers.Add(newEventReceiver2);
                        clientContext.ExecuteQuery();
                    }
                }
            } 

sharepoint online – using SharePointPnPCoreOnline with Azure function (v1)

I am creating my first Azure function (V1) with the SharePointPnPCoreOnline package and Visual Studio 2019/2017. If I have created a function project without SharePointPnPCoreOnline, it works correctly.

But when I added SharePointPnPCoreOnline there was a warning message like below

NU1608: Detected package version outside the dependency constraint:
Microsoft.Data.Services.Client 5.6.4 requires Microsoft.Data.OData (=
5.6.4) but the version Microsoft.Data.OData 5.8.4 has been resolved. NU1107: Version conflict found for Newtonsoft.Json. Install / referencing
Newtonsoft.Json 11.0.1 directly for projecting CRB.Functions for resolution
this problem. Functions -> SharePointPnPCoreOnline 3.18.2002 ->
Newtonsoft.Json (> = 11.0.1) CRB.Functions ->
Microsoft.NET.Sdk.Functions 1.0.24 -> Newtonsoft.Json (= 9.0.1).
Packet recovery failed. Reset package changes for & # 39; functions & # 39 ;.

During my research, I came across the following contribution from elio, in which the solution to this problem was proposed.

https://www.eliostruyf.com/using-the-latest-sharepoint-pnp-core-online-dependency-in-your-azure-functions/

Based on the recommendation in this post, the solution to this problem is to install the Newtonsoft.Json package before installing SharePointPnPCoreOnline.

The warning fell below when installing "Newtonsoft.Json 12.0.1".

NU1608 Detected package version outside the dependency constraint:
Microsoft.NET.Sdk.Functions 1.0.24 requires Newtonsoft.Json (= 9.0.1)
However, the Newtonsoft.Json 12.0.1 version has been fixed.

And now I'm stuck because I've added a "Newtonsoft.Json" reference to my Function v1 project with warnings. Should I ignore this warning and continue?

Enter the image description here

02/21/2020

After a discussion with @Derek, I also tested this with Azure Function V2 and Azure Function V3 and received warnings in both scenarios.

github repo https://github.com/ravick4u/AzureFunV1WithPnP

Azure function V2 failed

Warning NU1608 Detected package version outside of the dependency
Restriction: Microsoft.Data.Services.Client 5.6.4 requires
Microsoft.Data.OData (= 5.6.4), but version Microsoft.Data.OData 5.8.4
was resolved. 1

Warning NU1701 package & # 39; Microsoft.AspNet.WebApi.Core 5.2.3 & # 39; was
restored with & # 39; .NETFramework, Version = v4.6.1,
.NETFramework, Version = v4.6.2, .NETFramework, Version = v4.7,
.NETFramework, Version = v4.7.1, .NETFramework, Version = v4.7.2,
.NETFramework, Version = v4.8 & # 39; instead of the project target framework
& # 39; .NETCoreApp, Version = v2.1 & # 39 ;. This package may not be fully compatible
with your project.

Warning NU1701 package & # 39; Microsoft.Azure.ActiveDirectory.GraphClient
2.1.0 & # 39; was restored with & # 39; .NETFramework, Version = v4.6.1, .NETFramework, Version = v4.6.2, .NETFramework, Version = v4.7,
.NETFramework, Version = v4.7.1, .NETFramework, Version = v4.7.2,
.NETFramework, Version = v4.8 & # 39; instead of the project target framework
& # 39; .NETCoreApp, Version = v2.1 & # 39 ;. This package may not be fully compatible
with your project.

Warning NU1701 package & # 39; Microsoft.Data.Services.Client 5.6.4 & # 39; was
restored with & # 39; .NETFramework, Version = v4.6.1,
.NETFramework, Version = v4.6.2, .NETFramework, Version = v4.7,
.NETFramework, Version = v4.7.1, .NETFramework, Version = v4.7.2,
.NETFramework, Version = v4.8 & # 39; instead of the project target framework
& # 39; .NETCoreApp, Version = v2.1 & # 39 ;. This package may not be fully compatible
with your project.

Warning NU1701 package & # 39; Microsoft.IdentityModel 6.1.7600.16394 & # 39; was
restored with & # 39; .NETFramework, Version = v4.6.1,
.NETFramework, Version = v4.6.2, .NETFramework, Version = v4.7,
.NETFramework, Version = v4.7.1, .NETFramework, Version = v4.7.2,
.NETFramework, Version = v4.8 & # 39; instead of the project target framework
& # 39; .NETCoreApp, Version = v2.1 & # 39 ;. This package may not be fully compatible
with your project.

Warning NU1701 package & # 39; Microsoft.SharePointOnline.CSOM
16.1.19724.12000 & # 39; was restored with & # 39; .NETFramework, Version = v4.6.1, .NETFramework, Version = v4.6.2, .NETFramework, Version = v4.7,
.NETFramework, Version = v4.7.1, .NETFramework, Version = v4.7.2,
.NETFramework, Version = v4.8 & # 39; instead of the project target framework
& # 39; .NETCoreApp, Version = v2.1 & # 39 ;. This package may not be fully compatible
with your project.

Warning NU1701 package & # 39; SharePointPnP.IdentityModel.Extensions 1.2.4 & # 39;
was restored with & # 39; .NETFramework, Version = v4.6.1,
.NETFramework, Version = v4.6.2, .NETFramework, Version = v4.7,
.NETFramework, Version = v4.7.1, .NETFramework, Version = v4.7.2,
.NETFramework, Version = v4.8 & # 39; instead of the project target framework
& # 39; .NETCoreApp, Version = v2.1 & # 39 ;. This package may not be fully compatible
with your project.

Warning NU1701 package & # 39; SharePointPnPCoreOnline 3.18.2002 & # 39; was
restored with & # 39; .NETFramework, Version = v4.6.1,
.NETFramework, Version = v4.6.2, .NETFramework, Version = v4.7,
.NETFramework, Version = v4.7.1, .NETFramework, Version = v4.7.2,
.NETFramework, Version = v4.8 & # 39; instead of the project target framework
& # 39; .NETCoreApp, Version = v2.1 & # 39 ;. This package may not be fully compatible
with your project.

Azure V3 error

Warning NU1701 package & # 39; Microsoft.AspNet.WebApi.Core 5.2.3 & # 39; was
restored with & # 39; .NETFramework, Version = v4.6.1,
.NETFramework, Version = v4.6.2, .NETFramework, Version = v4.7,
.NETFramework, Version = v4.7.1, .NETFramework, Version = v4.7.2,
.NETFramework, Version = v4.8 & # 39; instead of the project target framework
& # 39; .NETCoreApp, Version = v3.0 & # 39 ;. This package may not be fully compatible
with your project.

Warning NU1701 package & # 39; Microsoft.Azure.ActiveDirectory.GraphClient
2.1.0 & # 39; was restored with & # 39; .NETFramework, Version = v4.6.1, .NETFramework, Version = v4.6.2, .NETFramework, Version = v4.7,
.NETFramework, Version = v4.7.1, .NETFramework, Version = v4.7.2,
.NETFramework, Version = v4.8 & # 39; instead of the project target framework
& # 39; .NETCoreApp, Version = v3.0 & # 39 ;. This package may not be fully compatible
with your project.

Warning NU1701 package & # 39; Microsoft.Data.Services.Client 5.6.4 & # 39; was
restored with & # 39; .NETFramework, Version = v4.6.1,
.NETFramework, Version = v4.6.2, .NETFramework, Version = v4.7,
.NETFramework, Version = v4.7.1, .NETFramework, Version = v4.7.2,
.NETFramework, Version = v4.8 & # 39; instead of the project target framework
& # 39; .NETCoreApp, Version = v3.0 & # 39 ;. This package may not be fully compatible
with your project.

Warning NU1701 package & # 39; Microsoft.IdentityModel 6.1.7600.16394 & # 39; was
restored with & # 39; .NETFramework, Version = v4.6.1,
.NETFramework, Version = v4.6.2, .NETFramework, Version = v4.7,
.NETFramework, Version = v4.7.1, .NETFramework, Version = v4.7.2,
.NETFramework, Version = v4.8 & # 39; instead of the project target framework
& # 39; .NETCoreApp, Version = v3.0 & # 39 ;. This package may not be fully compatible
with your project.

Warning NU1701 package & # 39; Microsoft.SharePointOnline.CSOM
16.1.19724.12000 & # 39; was restored with & # 39; .NETFramework, Version = v4.6.1, .NETFramework, Version = v4.6.2, .NETFramework, Version = v4.7,
.NETFramework, Version = v4.7.1, .NETFramework, Version = v4.7.2,
.NETFramework, Version = v4.8 & # 39; instead of the project target framework
& # 39; .NETCoreApp, Version = v3.0 & # 39 ;. This package may not be fully compatible
with your project.

Warning NU1701 package & # 39; SharePointPnP.IdentityModel.Extensions 1.2.4 & # 39;
was restored with & # 39; .NETFramework, Version = v4.6.1,
.NETFramework, Version = v4.6.2, .NETFramework, Version = v4.7,
.NETFramework, Version = v4.7.1, .NETFramework, Version = v4.7.2,
.NETFramework, Version = v4.8 & # 39; instead of the project target framework
& # 39; .NETCoreApp, Version = v3.0 & # 39 ;. This package may not be fully compatible
with your project.

Enter the image description here

Cannot get access token for the Sharepoint online add-in using the c # Console application

In the past few days I have tried all possible possibilities. However, the access token for accessing the Sharepoint online add-in with the C # console application could not be obtained. However, I was able to get the access token from POSTMAN.

I couldn't get a reasonable answer over the Internet. I frame a web request and pass the details such as customer ID, customer secret, client, resource, etc., similar to a POSTMAN request, but always get 401 unauthorized.

Always the following message: "The remote server returned an error: (401) Not authorized."

Change permissions on the document library over 5,000 items SharePoint Online

I have a document library with well over 5,000 items.
I need to update the document library permissions, but I can't. When I try to break inheritance, I get a warning

& # 39; The attempted operation is prohibited because it exceeds the list
Show threshold enforced by administrator. & # 39;

I also tried the CSOM.

Microsoft has certainly not made it impossible to change permissions when a document library contains more than 5,000 files.

Content delivery in SharePoint 2019 fails

We are currently considering upgrading from SharePoint 2016 to 2019. One of the features we continue to use is to provide content for our publishing site. It worked fine in 2016, but in 2019 it fails when the role with restricted access is imported:

(Progress) Import role-restricted access.
(FatalError) (-2146233079) (System.InvalidOperationException) (Updates to system roles are not permitted.)
(Debugging) at Microsoft.SharePoint.Deployment.RolesImport.ProcessSimpleElement (ImportStreamingContext context, XmlReader xr, SqlSession session, SqlCommand comm, Int32 iRow)
at Microsoft.SharePoint.Deployment.SqlBatchImport.Run ()
at Microsoft.SharePoint.Deployment.SecurityObjectSerializer.SetObjectData (object object, SerializationInfo information, StreamingContext context, ISurrogateSelector selector)
at Microsoft.SharePoint.Deployment.XmlFormatter.CallSetObjectData (object obj, SerializationInfo objectData, ISerializationSurrogate replacement, ISurrogateSelector selector)
at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObjectDirect (object objParent, type objectType)
at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject (type objectType, Boolean isChildObject, DeploymentObject envelope)
at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize (Stream serializationStream)
at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize (Stream serializationStream)
at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects ()
at Microsoft.SharePoint.Deployment.SPImport.Run ()

When I set the "Security Information in Content Deployment" drop-down list to "None" (within the content deployment path settings), I get the following error message instead:

(FatalError) (-2147286782) (Microsoft.SharePoint.SPException) (An attempt was made to use an object that no longer exists. (Exception from HRESULT: 0x80030102 (STG_E_REVERTED)))
(Debug) at Microsoft.SharePoint.SPGlobal.HandleComException (COMException comEx)
at Microsoft.SharePoint.Library.SPRequest.GetRoleDefsDataAsSafeArray (string bstrUrl, UInt32 dwRolesScope, Guid & pguidScopeId, UInt32 & pdwRowCount, Object & pvarDataSet)
at Microsoft.SharePoint.SPRoleDefinitionCollection.Init ()
at Microsoft.SharePoint.SPWeb.get_HasUniqueRoleDefinitions ()
at Microsoft.SharePoint.Deployment.SecurityObjectSerializer.SetObjectData (object object, SerializationInfo information, StreamingContext context, ISurrogateSelector selector)
at Microsoft.SharePoint.Deployment.XmlFormatter.CallSetObjectData (object obj, SerializationInfo objectData, ISerializationSurrogate replacement, ISurrogateSelector selector)
at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObjectDirect (object objParent, type objectType)
at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject (type objectType, Boolean isChildObject, DeploymentObject envelope)
at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize (Stream serializationStream)
at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize (Stream serializationStream)
at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects ()
at Microsoft.SharePoint.Deployment.SPImport.Run ()

Any ideas on what to look for? The page itself seems to be working well. The deployment logs for 2016 show that an attempt is also made to import the role with restricted access, but it does not crash and burn there. So I think something has changed in the way permissions are handled in 2019.

UPDATE: In January 2020, Microsoft recognized that this was a bug and will be addressed in its March 2020 product update.

sharepoint online – Run my remote event receiver with elevated permissions using GetAppOnlyContext instead of CreateRemoteEventReceiverClientContext

I am working on a remote event receiver on our SharePoint online site. The RER does some work where the user must have full control over the site, e.g. E.g.: –

  1. The RER sets the default values ​​in the list using the "Column Default Settings" as follows: –
    Enter the image description here

Now I used the standard code I received when I added the RER to my Visual Studio project, in which the client context is created as follows using (ClientContext context = TokenHelper.CreateRemoteEventReceiverClientContext(properties)), And my RER worked fine when I test it with the site administrator username, but it fails when I test it with a contributing user, so I realize that the problem is user permissions. So I read about running the RER with elevated permissions and found this project at https://derekgusoff.wordpress.com/2017/11/08/remote-event-receivers-youre-all-doing-it-wrong/.

So I change the creation of the client context as follows using (ClientContext context = Helpers.GetAppOnlyContext(siteUrl)), here is the helper class: –

 public class Helpers
    {
        public static ClientContext GetAppOnlyContext(string siteUrl)
        {
            try
            {
                Uri siteUri = new Uri(siteUrl);
                string realm = TokenHelper.GetRealmFromTargetUrl(siteUri);
                string accessToken = TokenHelper.GetAppOnlyAccessToken(TokenHelper.SharePointPrincipal, siteUri.Authority, realm).AccessToken;

                return TokenHelper.GetClientContextWithAccessToken(siteUri.ToString(), accessToken);
            }

            catch (Exception ex)
            {
                Trace.TraceInformation("GetAppOnlyContext failed. {0}", ex.Message);
            }
            return null;
        }

        public static ClientContext GetAuthenticatedContext(string siteUrl)
        {
            string userName = WebConfigurationManager.AppSettings.Get("AuthenticatedUserName");
            string password = WebConfigurationManager.AppSettings.Get("AuthenticatedUserPassword");
            return GetAuthenticatedContext(siteUrl, userName, password);
        }

        public static ClientContext GetAuthenticatedContext(string siteUrl, string userName, SecureString password)
        {
            ClientContext ctx = new ClientContext(siteUrl);
            ctx.Credentials = new SharePointOnlineCredentials(userName, password);
            return ctx;
        }

        public static ClientContext GetAuthenticatedContext(string siteUrl, string userName, string password)
        {
            SecureString securePassword = GetPassword(password);
            return GetAuthenticatedContext(siteUrl, userName, securePassword);
        }

        private static SecureString GetPassword(string passwd)
        {
            var secure = new SecureString();
            foreach (char c in passwd)
            {
                secure.AppendChar(c);
            }
            return secure;
        }

        public static string EmptyIfNull(object obj)
        {
            return obj == null ? "" : obj.ToString();
        }
    }

and the RER worked well for contributors, which is great. based on that now I have these 2 questions: –

  1. My approach is to create the client context like this
    using (ClientContext context = Helpers.GetAppOnlyContext(siteUrl))considered a valid approach?

  2. Now the RER worked fine with the app context even though I didn't check this box: –
    Enter the image description here

How is it that my RER works with AppOnlyContext without having activated the checkbox above?

Thanks in advance for any help.

How can you change the search placeholder text for SharePoint Online globally?

For SharePoint Online, I am looking for a way to globally change the placeholder text shown in the attached screenshot for the search input. Is this possible without having to add a Javascript web part to every page?

Sharepoint online site search

I have already tried playing around with "Site Settings> Search Settings", but when I change these settings only the search entry "admin" seems to change, which is a completely different search component with a dropdown menu [2nd screenshot].

Sharepoint online search settings

Any help is much appreciated, thanks!

Microsoft Graph API for checking Active Directory member or group permission on a SharePoint site

I'm looking for a Microsoft Graph API to determine if there is an Active Directory group (not an SP group) that a user belongs to that gives the user the appropriate rights to access a specific SharePoint site.

Is there a direct way to search for this information? I am trying to find this information through the Microsoft Graph API, but I am not getting this information.

Can you determine whether an Active Directory user or group can access a SharePoint site?

Sharepoint site – I need to put data into a list (only this) from a form that everyone can access without authentication or invitation

On our SharePoint website I have to have a form for a feedback project that is accessible to everyone (internally or externally for our organization and outside of the SharePoint website, i.e. accessible to everyone via the web) and without automatic authentication or invitation, etc ,

Anyone who has a link to this form can access the form (anyone within SharePoint and anyone from the web outside of SharePoint).
No automatic detection, no username and no password is required.
There must be a direct link to the form
The anonymous user simply follows the link, a new form is displayed, the necessary data is inserted, the form is submitted and paused. nothing else
The anonymous user can only use this form to insert data, nothing else and no other resources of the SharePoint

This form must in some way insert the data into a specific SharePoint list (called "example") or into a mirror list, which automatically synchronizes the data with the "example" list after inserting a new data record

I tried in many ways, but unfortunately to no avail
I can't find a solution to give everyone access to a form

I can use an external HTML website where I can create the required form. How can I connect it to the SharePoint list?

Please, someone can help me
Is there a solution to this requirement or a workaround to be solved?

Thanks in advance