How can I filter SharePoint search results according to the current user's department?

We are in SharePoint online and user profiles are synchronized with SharePoint.

I have a series of libraries that I want users to be able to search, but I want to restrict the documents that specific departments (Sales) can see to those that have been modified, created (author) or are identified in People type fields. For any user outside of those specific departments, I want the search to be complete.

I have the user section working correctly (the current user is associated with the registry), but I have problems filtering the entire search according to the current user's department.

The recreation of the library or the manual configuration of the permissions are not options at this point due to size (<900k documents) and trade restrictions (they are actively used in production), so I am limited to the restriction to through the search now.

Any / all help is welcome! My search results query is below.

ListID: {deleted for security} OR ListID: {deleted for security} OR ListID: {deleted for security}
Y (
{User.Department} = "Commercial Sales - Healthcare"
O {User.Department} = "Commercial sales"
O {User.Department} = "Commercial Sales - Enterprise"
O {User.Department} = "Federal Sales - Healthcare"
O {User.Department} = "Federal Sales - Civilian"
O {User.Department} = "Federal Sales - DOD"
O {User.Department} = "SLED Sales"
) Y (
Author = {username}
O ModifiedBy = {User.Name}
OR ISAM = {username}
Or seller = {username}
) O (
{User.Department} <> "Commercial Sales - Healthcare"
And {User.Department} <> "Commercial sales"
And {User.Department} <> "Commercial Sales - Enterprise"
And {User.Department} <> "Federal Sales - Healthcare"
And {User.Department} <> "Federal Sales - Civilian"
And {User.Department} <> "Federal Sales - DOD"
AND {User.Department} <> "SLED Sales"

Python to sharepoint without credentials

I'm working on a project that wants me to connect to corporate SharePoint and download files using scripts. But they do not want to put a username and password in the scripts or give credentials. How can I access sharepoint from the company's computer? I guess I can assume that everything is connected, so I do not need to enter passwords.

powershell – Classic SharePoint experience

I hope you are well;

I currently had the classic Experience set up for all site collections in SharePoint Online, however, this morning has changed everything to a modern experience for lists and libraries.

I would like to know what is the best way to revert it to the Classical Experience.

Small style discrepancies when using React with Material-UI in SharePoint Online (not SPFx)

When I compile and publish my React application using Material-UI, I see a couple of small style problems in SharePoint Online. It seems that the SPO style is being inherited by my Material-UI components in some places and I wonder if there is a way to isolate them better at the application level.

For example, the action buttons on my card work but stretch horizontally.
card action button

Also, my TextField components still have the nice floating tag effect, but they have a border around it.
text field elements

Note that this application is not an SPFx project. Thanks for any help!

Custom HTML and CSS in sharepoint

The short answer is: Yes, you can customize the template of the page and the long answer will be, your question is very subjective and you can have several answers according to the design you are trying to achieve.

In classic SharePoint we have the concept of Master pages Y Page layouts to achieve the personalized theme / branding. But in the case of modern SPO pages, from now on there is a concept of SharePoint Lookbook, through which you can define the templates for page, themes and design and pre-populate the content of the page. Read more about SharePoint Lookbook.

Not recommended

This is not a recommended way, but if you have a strict requirement in which you want to hide all the SPO code, SPFx Application Customizer is your friend. You can use it to hide the SPO component to achieve your UI, and the SPFx web component to manage the content UI. Read more in the application customizer. The sample screenshot of personalization is following.

enter the description of the image here

What is the latest stable UC SharePoint 2013?

It is recommended to always be at UC, which is 1 month before the current month.

That way, you will be at the most stable UC and will be aware of any problems or exceptions that occur due to the CU of the current month.

I recently patched my SharePoint 2013 environment with the April 2019 patch and it seems the most stable patch at the moment.

The following is the information for this patch:

Build not – 15.0.5127.1001

Name of the compilation – April 2019

Component – SharePoint Server 2013

KB – KB4464514

Let me know in case of doubts.

sharepoint online – List form send data to excel in Documentlibrary

Stack exchange network

The Stack Exchange network consists of 175 question and answer communities including Stack Overflow, the largest and most reliable online community for developers to learn, share their knowledge and develop their careers.

Visit Stack Exchange

sharepoint foundation: the site can not be accessed using an alternative name after the alternative access assignments

The name of my server is "dev" and I need to change the name to access the site locally and also via LAN.
I changed the alternate name using AAM to "abc":

enter the description of the image here

On the local server, it says This page cant be shown yes i use http: // abc / to access the site

On the other system on the network, it says that the IP address of the servers could not be found:

enter the description of the image here

I tried to put the same in Intranet, Custom, Extranet Categories, but the problem is the same

If I put the IP address instead of abc, it works fine although I need to use the name to access the site instead of the IP address

Please help
enter the description of the image here

Online sharepoint: Can I change the site's homepage within a Site Design script?

I have created a site design based on several PowerShell scripts (through Add-SPOSiteScript -> Add-SPOSiteDesign). This creates a design with multiple lists and views, and adds URLs to those lists in the site's navigation menu.

However, I also want to add views to some of the lists to the home page, for example. to show recently added items from a number of the lists. Can this be achieved from a site design? Or is it necessary that this be carried out as a manual step after having created the site and applied the Design of the site? I can not see any documentation about it in any of the pages that have led me to this point:

Also, when I create a new Communication site and choose the design of my site during the creation step, I set up the home page to use the design version of the Topic site instead of the design version of the blank site. Can you configure this in my site design script?

Thanks in advance


Encrypt columns of SharePoint online lists

I am a bit of an expert in development but I have basic knowledge about SharePoint and Sharepoint Online.

I would like add an encryption thing to my list Sharepoint Online columns do it

  • possible to select if it should be
  • private (only the creator must be able to see the value deciphered)
  • based on roles (only people with a certain role should be able to see the deciphered value)
  • Public (everyone can see the value deciphered).

I understand that I need some type of customization to do this, so my question is:

  1. What is the best practice to encrypt list columns? Any built-in API function you can use?
  2. Is it even possible to add personalization to SharePoint Online? Please guide me where to start?