Browse Category

SharePoint

Changes to Sharing in SharePoint Online

There has been an update that I have seen in Office 365 in the options you get when trying to share content.  Previously when sharing something, you had the option to select a permission level and put the user(s) into a specific SharePoint Group.

image_thumb

The sharing process has recently been updated.  In newer tenants, mainly first release that I have seen, you will no longer see the select a permission level option when sharing from top right site share or the library level share.

image_thumb1

In a support case with Microsoft it was stated that “the feature of displaying groups on the sharing options of a site is deprecated and will no longer be available for the tenants which are on the newer versions. The reason for the deprecating this feature being, it is complex to show different set of permission levels set on each of the site collections and subsites considering unique permissions set at each web level.”

However I was able to still find the option to pick a group when using the Grant Permissions option under Site settings -> Site permissions.

image_thumb2

When you click the show options section you will see the select permission level section.  In that drop down select More options.

image_thumb3

You will then see the list of groups and permissions levels again.

image_thumb4

It is always interesting finding these unexpected changes.  This wasn’t a huge deal as we found a work around to get users into groups but this did disrupt a client’s business process until a resolution was found.

Adjusting Email Notifications For SharePoint 2013 Task Lists

When looking at the settings of a SharePoint 2013 task list you no longer have the option to enable email notifications.  This used to be found under List Settings -> Advanced Settings -> Send e-mail when ownership is assigned.

This is what it looks like in 2010.

tasknotifications

This can be still be turned on using Powershell in SharePoint 2013.  Here is the powershell to perform that task along with a link back to the source of the script.  Thanks to the creator of the script karimSP!

$site=Get-SPSite "http://sharepoint2013/"
$web=$site.OpenWeb()
$list=$web.Lists.TryGetList("Tasks")
if($list -ne $null)
{
 $list.EnableAssignToEmail =$true
 $list.Update()
}

Adjusting when the assigned to task email is fired

20  Fortunately we have the ability to change the types of event that fire these emails in powershell.  The primary use case I used this for is too only send task emails on creation of the item (Add).

The available options for when notifications are sent are listed in the SPEventType enumeration and they are:

Member Name Description
Add Additions to the list or list item. (0x00000001)
Modify All changes made in a list or list item. (0x00000002)
Delete Deletion of a list or list item. (0x00000004)
Discussion Changes in Web discussions. (0x00000FF0)
All All events pertaining to the list or list item. (-1)

 

Powershell to update the events

I have included variables at the top of the script that you can enter depending on the location of the task list(s) along with which ones you want to update.  Make sure you run the powershell to activate the assigned to email, the script above, prior to running this script.

##################################################################
# NAME: SharePoint2013TaskAlertEventTypes.ps1
# DESCRIPTION: Script to adjust SharePoint 2013 task list email notifications on different events
# AUTHOR: Drew Madelung
# LAST UPDATED: 11/11/2015
##################################################################

# ***IMPORTANT*** The powershell to enable assigned email notifications must be done prior to this script being ran

Add-PSSnapin Microsoft.SharePoint.Powershell

# Set variables - EXAMPLE variables are set
$sitecollectionUrl = "http://sharepoint2013"
# Eventtypes can be: All, Add, Modify, Delete, Discussion
$eventType = "Add"

# Optional variables - if not used, all event types for all assigned to task alert email notifcations on the listed site will be updated
$subsiteUrl = "/subsite"
$listUrl = "lists/tasks"

$site = Get-SPSite $sitecollectionUrl

# Get subsite if entered
if ($subsiteurl -eq "") { $web = $site.OpenWeb() } else { $web = $site.OpenWeb($subsiteUrl) }

$a = $web.Alerts

foreach ($alert in $a)
{
 $alerttemplate = $alert.DynamicRecipient
 if ($alerttemplate -eq "AssignedTo") {
 if ($listUrl -eq "") {
 $alert.EventType = [Microsoft.SharePoint.SPEventType]::$eventType
 $alert.Update()
 Write-Host 'Updated event type to' $eventType 'for the list' $alert.list
 }
 
 else {
 if ($alert.ListUrl -eq $listUrl) { 
 $alert.EventType = [Microsoft.SharePoint.SPEventType]::$eventType
 $alert.Update()
 Write-Host 'Updated event type to' $eventType 'for the list' $alert.list
 } 
 } 
 } 
}
$web.Dispose()
$site.Dispose()            Write-Host 'Updated event type to' $eventType 'for the list' $alert.list
            }
            
        else {
            if ($alert.ListUrl -eq $listUrl) { 
              $alert.EventType = [Microsoft.SharePoint.SPEventType]::$eventType
              $alert.Update()
              Write-Host 'Updated event type to' $eventType 'for the list' $alert.list
            }    
        }    
    }    
}
$web.Dispose()
$site.Dispose()

Link to download powershell script

16235-illustration-of-a-green-download-button-pv

If anyone has any thoughts or suggestions for this script please let me know!

Exporting SharePoint Group Members to Excel Without PowerShell

I was at a client recently and was not allowed to run any powershell commands but needed a list of accounts that existed in a SharePoint Group in a table format.  I also was not allowed site collection administration permission.  I tried a few different options in which trying to manipulate the list view of the group and using Excel data connections to get back to SharePoint but no option worked very cleanly.

What I ended up using was a REST call to get the users and then downloading the XML response and opening it with Excel.  Use this link to learn about the available REST api’s for users & groups

Here are the steps….

1.  Get a client that you can use to test REST calls

2.  Construct the REST call to get a list of users by group

The structure looks like this:  https://siteurl/_api/web/sitegroups/getbyid(groupid)/users

  • To get the group ID simply navigate to the members page of your SharePoint Group and look at the number at the end of the URL  Here is the URL of my “Product Members” group:  https://concurrencyinc.sharepoint.com/sites/products/_layouts/15/people.aspx?MembershipGroupId=9

Here is my call:  https://concurrencyinc.sharepoint.com/sites/products/_api/Web/SiteGroups/GetById(9)/Users

  • We will see the users returned in the entry area of the response.

ExportSPGroup1

3.  Download the XML response

  • In the Advanced REST Client click Save as file and then Download in the response section.

ExportSPGroup2

4.  Change the file type

  • The file will download as a .text-plain file type.  Edit the filename and change it to a .xml file type.

ExportSPGroup3

5.  Open with Excel!

  • In Excel browse and pick out the new .xml file you created and select open this file as an XML table.

ExportSPGroup8

  • Take a second and look at your pretty data.

ExportSPGroup4

6.  Remove duplicates

  • The data comes across in a way that there are 2 rows for each user.  We can clean that up by removing the duplicates based on the login name.  First click anywhere in the imported table and under the Data tab click Remove Duplicates.

ExportSPGroup5

  • Click the Unselect All button then scroll down and check ns4:LoginName

ExportSPGroup6

  • That will remove your duplicate logins and you will have emails and logins that you can use whatever way you need.

ExportSPGroup7

 

Handy appendix?

I know this post is titled how to get a list without powershell but I wanted to just include this down here as this is an easier approach if you have the ability.  Here are the commands to get a list of users in a SharePoint Group via powershell.

  • Get-SPSite http://server/sites/yoursite | Select -ExpandProperty RootWeb | Select -ExpandProperty Groups | Where {$_.Name -EQ “group name”} | Select -ExpandProperty Users | Select Name, Email| Export-Csv c:\scripts\users.txt

Here is the command to do it with SharePoint Online

  • Get-SPOUser -Site https://contoso.sharepoint.com/sites/finance -Group “group name”

Handy links!

InfoPath 2013 for Office 365 ProPlus

InfoPath 2013 is sticking true to the continuing support statements that were made about the software by releasing a standalone version.  For anyone who was running the Office 365 ProPlus edition of Microsoft Office, it was not possible to also run InfoPath.  Thankfully this has now changed and the standalone version can run side-by-side with Office and is now available to download from Microsoft.

Click the image below to download

infopath_logo

I ran the install and everything worked great!

2015-09-08 09_01_20-Microsoft InfoPath 2013

Should I still be using InfoPath in my SharePoint or O365 projects?

To continue with a favorite consultant response unfortunately is “it depends…”  InfoPath is supported in Office 365 and is supported in SharePoint Server 2016 so it is not going anywhere soon.  This is a question that I hear a lot and I wanted to put down my high level recommendations.

  • Using InfoPath to edit list forms is just fine
  • Using InfoPath for short term form solutions is also ok
  • Using InfoPath for enterprise business process solutions or long term projects should be used as an exception

There are plenty other 3rd party or development solutions that would ensure better longevity.  If you want to discuss any unique scenarios, please reach out to us and we can work on a strategy that best fits your business needs.