Quantcast
Channel: Microsoft Online: SharePoint Online forum
Viewing all 10096 articles
Browse latest View live

How to show inactive/sign in blocked user in SharePoint online people picker control?

$
0
0


Hello,

We are using the SharePoint Online modern UI. In our HR site there are documents that need to tag with the employee name and people picker is the best solution to show the employee name. Some of the employees are no longer working with the organization and the need to preserve the documents along with the employee name, terminated employee accounts are inactive or sign in blocked in the active directory (Azure Active Directory) and not showing in the people picker control. Is there a way we can show inactive/sign in blocked users in the people picker control? Would be great if anybody knows how I can do this.

Thanks.


OneDrive - Ability to 'Unsync' SharePoint using a command like odopen://

$
0
0

Hello,

We have a lot of staff movement and looking at simplify SharePoint experience for files by setting up OneDrive Sync.  

We have been using the tool in our IT team successfully and have now written a tool that in Logon Scripts would automatically setup for a staff member OneDrive Folder Sync using the odopen:// command.  The command below would sync all SharePoint Libraries (non-System) to the local user's Desktop from the IT SharePoint Site.

i.e.   SharePointSync.exe "https://ourcompany.sharepoint.com/sites/ourcompany/IT/[ALL]/"

One thing I'm interested in is Un-Sync.  Is there a command available, or an API that you can call OneDrive to UnSync a folder? I was considering whether every quarter I could run an OneDrive /reset, and then re-sync all existing folders - would this work?

Thanks
Glenn Goodwin

Sharepoint online - Folder sharing from a Site

$
0
0

A user has a private Sharepoint site, and has several folders in the site. User is sharing a particular folder to a user and the end user is also getting automatic email of the folder shared thing, but the end user gets ÿou need necessary permission to this element error.

Checked for the lockdown feature on site, and it is not activated.

Any help on this is appreciated..

(SPFx) Uploaded app in app catalogus not visible in (Add an app) "My Apps"

$
0
0
Hi,

I created an webpart and tested it in Workbench and it all worked. Now I uploaded it in app catalogus without problems





When I want to add the app to an SharePoint site i cant find the app! What am I doing wrong?

People Web part - force view setting on iPhone

$
0
0

Hi

I'm experimenting with the "People" web part.

There are two possible views: compact & descriptive

in the descriptive option is an additional text field.


When i set the web part settings to "descriptive" it works on PC & iPad, even if i use a very small browser window.

On the iPhone screen, the web part is always displayed as "compact", so the additional information in the text field is not visible.

Is there an option to force the view on the iPhone?

In the site settings the "Mobile Browser View" is not activated.


Thanks

Please can I have some clarification on SharePoint Online and PowerQuery

$
0
0

Hi

I will keep this to the point.

PowerQuery with a SQL db imports 100,000s of rows in the time it takes for a SharePoint Online list to import 1000s. Why is this?

This is with a standard New Query->From SharePoint Online List->List and that's it.
It also appears that, unlike when importing a SQL db, PowerQuery first imports the entire dataset andthen filters it. This must be the case because if I change my query from the standard SharePoint connection to a OData Feed, it is much much much much faster. The only downside is that I need to, for a month's data, combine three queries with the dates going from the 1st-10th, 11th-20th, etc. to avoid the view threshold limit. Again, I can also do a VBA connection to the list and it is much faster, so again it must be that the PowerQuery for SharePoint Online is incredibly inefficient. This causes issues because I won't have this freedom of VBA etc. with Power BI as I do with Excel.

So could a professional please give an answer to this?

Please provide custom JS code example for opening sub-menu link in a new window. The navigation is using a Managed Metadata term set.

$
0
0
Hi,

In SharePoint Online, the navigation is using a Managed Metadata term set & has some external links.

I have added the following custom JS code for the sub-menu that is dynamically generated on hover of main menu option:

$(document).ready(function () {

$(document).on('click', 'a.ms-ContextualMenu-link', function() {

if($(this).attr('href').toLowerCase().indexOf("intranet") == -1){
      window.open($(this).attr('href'), '_blank');
       return false;
   }
});

});

The Javascript file is loaded but the click event is not working for the sub-menu item. 

Please provide working JS code example ASAP. 

SharePoint Client CSOM (C#) best practice to add a document reference

$
0
0

hello,


i tried to add a reference to an exiting folder of an existing file in document libary.

The folder is loaded by uniqueid

...
var guid = this.ObjectGuid;
rootfolder = clientContext.Web.Lists.GetByTitle("Dokumente");
var list = rootfolder.GetItemByUniqueId(guid);
clientContext.Load(list);
clientContext.Load(list.Folder);
clientContext.ExecuteQuery();
var folder = list.Folder;

I have no problems to add Files, but how to add a reference to a file?

PS: Exists a better way to get the document libary root folder?
PPS: Why fails the function clientContext.Web.Lists.GetById() with guid (SPException, List not found)?




Deny users writing to OneDrive SharePoint root in File Explorer

$
0
0

How do i stop users creating folders and document in the SharePoint root?

i.e. The area that lists all the subsites (yellow highlight below).

Thanks,

Fulton.


Have a good day.


Access folder on the site using PS.

$
0
0
Hello,

I need to get information about all files in the folder on the site.
Try to access the site using CSOM. I am using account which has SPO admin access:

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")
$user = "admin@company.ca"
$pw = Read-Host -Prompt "Enter password" -AsSecureString
$url= 'https://companygroup.sharepoint.com/sites/business'
$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($url)
$creds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($user,$pw)
$ctx.Credentials = $Creds
$ctx.ExecuteQuery()
$web = $ctx.Web
$ctx.load($web)
$ctx.ExecuteQuery()
$web.Title

Have issue with $ctx.Web, it returns:
format-default : The collection has not been initialized. It has not been requested or the
request has not been executed. It may need to be explicitly requested.
    + CategoryInfo          : NotSpecified: (:) [format-default], CollectionNotInitializedE
   xception
    + FullyQualifiedErrorId : Microsoft.SharePoint.Client.CollectionNotInitializedException
   ,Microsoft.PowerShell.Commands.FormatDefaultCommand

In the same time $ctx.ExecuteQuery() does not return any error, and $ctx returns object:
Web                          : Microsoft.SharePoint.Client.Web
Site                         : Microsoft.SharePoint.Client.Site
FormDigestHandlingEnabled    : True
ServerVersion                : 16.0.8720.1222
Url                          : https://companygroup.sharepoint.com/sites/business
ApplicationName              : .NET Library
ClientTag                    :
ValidateOnClient             : True
AuthenticationMode           : Default
FormsAuthenticationLoginInfo :
Credentials                  : Microsoft.SharePoint.Client.SharePointOnlineCredentials
WebRequestExecutorFactory    : Microsoft.SharePoint.Client.DefaultWebRequestExecutorFactory
PendingRequest               : Microsoft.SharePoint.Client.ClientRequest
HasPendingRequest            : False
Tag                          :
RequestTimeout               : 180000
StaticObjects                : {[Microsoft$SharePoint$SPContext$Current,
                               Microsoft.SharePoint.Client.RequestContext]}
ServerSchemaVersion          : 15.0.0.0
ServerLibraryVersion         : 16.0.8720.1222
RequestSchemaVersion         : 15.0.0.0
TraceCorrelationId           : bff3ce9e-6069-8000-90d5-bf18683024b5


PowerShell version: 5.1.14393.2828

Office Awards Page (Created by SP2016) (Filtering View Question)

$
0
0

Hello,

I am working on our Office Awards Page.  I have 7 different Document Libraries which houses different employee Performance Awards based on Award Type and other columns our Supervisor wants to see.  Trying to get the view to only show the new award nominations and take the old nominations and move them to the archive.  I have archive view established.  I am having trouble getting the filters to display the correct way for each document library.  I do have award type column, status column, Approve/Disapprove column created.  Can someone help me with the boolean logic with the and/or in the filtering section in library settings?

Thank you

Chris

Sharepoint Online Report

$
0
0

Hi guys,

I want to create a custom dashboard about page activity including reading, viewing and downloading documents.

For my policy, I can't use Sharepoint Online.

How can I do it?

Thanks,

Please provide custom JS code example for opening drop-down menu link in a new window. The navigation is using a Managed Metadata term set.

$
0
0
Hi,

In SharePoint Online, the navigation is using a Managed Metadata term set & has some external links.

I have added the following custom JS code for the drop-down menu that is dynamically generated on hover of main menu option:

$(document).ready(function () {

$(document).on('click', 'a.ms-ContextualMenu-link', function() {

if($(this).attr('href').toLowerCase().indexOf("intranet") == -1){
      window.open($(this).attr('href'), '_blank');
       return false;
   }
});

});

The Javascript file is loaded but the click event is not working for the drop-down menu item. 

Please provide working JS code example ASAP. 

Can't un-declare files as records

$
0
0

Hi

We are getting a correlation ID when trying to click on the compliance detail option in <g class="gr_ gr_50 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="50" id="50">sharepoint</g> online:

Sorry, something went wrong An unexpected error has occurred. TECHNICAL DETAILS Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: cdaccf9e-c01d-8000-8946-6752ca9a7bdd

 

We have also tried <g class="gr_ gr_79 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="79" id="79">powershell</g>  scripts shown below:

function Declare-Record

{

param (

[Parameter(Mandatory=$true,Position=1)]

        [string]$Username,

        [Parameter(Mandatory=$true,Position=2)]

        [string]$Url,

[Parameter(Mandatory=$true,Position=3)]

        $password,

[Parameter(Mandatory=$true,Position=4)]

        [string]$ListTitle

        )

$ctx=New-Object Microsoft.SharePoint.Client.ClientContext($url)

[Microsoft.SharePoint.Client.ClientRuntimeContext]
$rctx=[Microsoft.SharePoint.Client.ClientRuntimeContext]$ctx.Site.Context

$ctx.Credentials = 
New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username,
$password)

$ctx.Load($ctx.Web)

$ctx.ExecuteQuery()

$ll=$ctx.Web.Lists.GetByTitle($ListTitle)

$ctx.Load($ll)

$ctx.ExecuteQuery()

$spqQuery = New-Object Microsoft.SharePoint.Client.CamlQuery

$spqQuery.ViewXml ="<View Scope='RecursiveAll' /><Where><Eq><FieldRef Name='ServerRelativeUrl'/><Value Type='Text'>/VersionTest/Folder2/FolderWithinFolder</Value></Eq></Where>";

$itemki=$ll.GetItems($spqQuery)

$ctx.Load($itemki)

$ctx.ExecuteQuery()

foreach($item
in $itemki)

{

Write-Host "Processing item no "
$item.ID

$ctx.Load($item)

$ctx.Load($item.File)

$ctx.ExecuteQuery()

[Boolean] $bool=[Microsoft.SharePoint.Client.RecordsRepository.Records]::IsRecord($rctx,
$item)

if($bool)

{

[Microsoft.SharePoint.Client.RecordsRepository.Records]::UnDeclareItemAsRecord($rctx,$item)

$ctx.ExecuteQuery()

Write-host $item.File.Name
" " $item.File.ServerRelativeUrl
"has been undeclared as a record" -ForegroundColor Green

}

else

{

Write-Host $item.File.Name
" " $item.File.ServerRelativeUrl
" is not a record." -ForegroundColor Red

}



}




}



#Paths to SDK

Add-Type -Path 
"C:\Users\MyName\Downloads\Microsoft.SharePointOnline.CSOM.16.1.8715.1200\lib\net45\Microsoft.SharePoint.Client.dll"

Add-Type -Path 
"C:\Users\Myname\Downloads\Microsoft.SharePointOnline.CSOM.16.1.8715.1200\lib\net45\Microsoft.SharePoint.Client.Runtime.dll"

Add-Type -Path 
"C:\Users\Myname\Downloads\Microsoft.SharePointOnline.CSOM.16.1.8715.1200\lib\net45\Microsoft.Office.Client.Policy.dll"

#Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"

#Enter the data

$AdminPassword=Read-Host -Prompt
"Enter password" -AsSecureString

$username="My.Name@contoso.com"

$Url="https://contoso.sharepoint.com/sites/Contoso"

$ListTitle="contoso"

Declare-Record -Username $username -Url 
$Url -password $AdminPassword -ListTitle
$ListTitle

I have made sure that I have made one file to be declared as a record but after running the script above, it keeps saying it is not a record. It gives the below message even though it is a record:

Cannot convert argument "context", with value: "Microsoft.SharePoint.Client.ClientContext", for "IsRecord" to type
"Microsoft.SharePoint.Client.ClientRuntimeContext": "Cannot convert the "Microsoft.SharePoint.Client.ClientContext"
value of type "Microsoft.SharePoint.Client.ClientContext" to type "Microsoft.SharePoint.Client.ClientRuntimeContext"."
At C:\users\myname\Documents\Fix Records.ps1:35 char:9
+         [Boolean] $bool=[Microsoft.SharePoint.Client.RecordsRepositor ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

Hello.docx   /sites/contoso/Records/Hello.docx  is not a record.

What am I doing wrong?? 

Many thanks.


Cannot undeclare records from my docuemt library

$
0
0

Hi all, I've tried manually undeclaring records in my document library but get this error when cllicking on compliance details of the files in the document library '' Sorry, something went wrong An unexpected error has occurred. TECHNICAL DETAILS Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: cdaccf9e-c01d-8000-8946-6752ca9a7bdd Date and Time: 04/04/2019 06:53:12''

We have also tried various powershell options after googling them online but no luck yet.

Has anyone experienced anything similar or have any solutions?

Regards


kegan1


Create expland/Collapse sections in SP Online List NewForm.aspx, Editform.aspx

$
0
0

Is it possible to create a expand/collapse like kind of UI form for the SPLIST's newform.aspx ?

Am having the similar requirement, customer wants to create a UI newform.aspx with divided into multiple sections  

with expand/collapse options.

am having admin section as well with access to only a set of users(added inside a sp group).


here is the link, i have gone through  , i have created this 

https://sharepoint.stackexchange.com/questions/232008/how-to-create-sections-in-list-form-sharepoint2013/232053

but, with the requirement now, am not able to convert this into a expand/collapse sections.

<script src="//code.jquery.com/jquery-3.2.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
    //set section text and field name
    AddSectionBeforeField("Informatat baze","Last Name");
    AddSectionBeforeField("Employment Data","Company");
});
function AddSectionBeforeField(sectionText,fieldName){
    var $fieldTR=$(".ms-standardheader nobr:contains('"+fieldName+"')").closest("tr");
    $fieldTR.before("<tr style='background-color:gainsboro'><td colspan='2' class='ms-formbody' style='padding:0'><div style='font-size:16px;font-weight:bold;'>"+sectionText+"</div></td></tr>");
}
</script>

how to make the above as Expand/collapse ( maye b with a  +sign or - sign  or any other icon) 

any help is appreciated!


Please provide custom JS code example for opening contextual menu link in a new window. The navigation is using a Managed Metadata term set.

$
0
0

Hi,

In SharePoint Online, the navigation is using a Managed Metadata term set & has some external links.

I have added the following custom JS code for the contextual menu that is dynamically generated on hover of main menu option:

$(document).ready(function () {

$(document).on('click', 'a.ms-ContextualMenu-link', function() {

if($(this).attr('href').toLowerCase().indexOf("intranet") == -1){
      window.open($(this).attr('href'), '_blank');
       return false;
   }
});

});

The Javascript file is loaded but the click event is not working for the contextual menu item. 

Please provide working JS code example ASAP. 

Thanks.

Managed global navigation drop downs not displaying text

$
0
0

We have a SharePoint Online site that was developed by a third party and we are now pretty much on our own to maintain it.  The response time is terrible.  My research indicates that one of the things that can effect this is using Structured Navigation on SharePoint Online.  So I am trying to switch the site to Managed Navigation with terms.  I have built the Term Group as I think it should be (this is completely new to me!).  When I change the Global Navigation from Structured to Managed and point to the correct Term Group, the global (top) navigation appears correct, but the drop down menus do not have any text in them.  They appear to be the correct size   For testing, I have added Hover text to some of the drop down entries.  This hover text is displayed when I hover on the drop down menu and the links actually work.  Any suggestions?

To add to the frustration, I have now discovered that the third levels of sub-menus display properly when their parent (2nd level) sub-menu is hovered on.

How can I generate a list of site in a site collection that may have installed a 3rd party app?

$
0
0
I installed a 3rd party app in the app catalog for a particular site collection to use. Because this app is discoverable by all my users is it possible for me to generate a report or list of site and site collections who have also installed this app? If so how?

New-SPOPublicCdnOrigin returns error

$
0
0

Hello

When I run the following command

New-SPOPublicCdnOrigin -Url https://{tenant}.sharepoint.com/sites/dev/SiteAssets/cdn

I get the following error:

New-SPOPublicCdnOrigin - CDN feature is not enabled by the tenant administrator.

Running Get-SPOTenant | select PublicCdnEnabled returns False

So then I run the Add-SPOTenantCdnOrigin command which runs successfully.

My question is: Why did the New-SPOPublicCdnOrigin fail? How do I get it to work?

Thanks

Yoshi

Viewing all 10096 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>