1

I'm providing some users temporary access to an area for end of financial year and I want to make those permissions expire in two weeks. Is there a way to do this?

3 Answers 3

2

Well everything is possible, but this is not OTB functionality in SharePoint. It will need custom development, and quite a lot of it. Perhaps creating AD accounts just for this purpose, with expiring passwords is a better strategy?

1
  • I had thought of that - but it's existing roles gaining increased functionality whilst a team leader is on leave. I suppose I'll write something custom - was just hoping I could avoid that, dependencies and all that jazz!
    – Michael A
    Aug 7, 2013 at 6:18
3

A somewhat simple approach is to utilize PowerShell and Task Scheduler.

  1. For a one off, you can simply schedule the task to run on a specific date/time and run script to remove rights from the user.
  2. You could expand it by using a tracking list that holds user and expire date, then have the script check this and run based on the inputs.

Have the scheduler run something like this (just a sample, you can expand as needed of course):

$web = Get-SPWeb <your url>
$user = get-spuser -Identity <username> -Web $web.url
$list = $web.Lists[<libaryname>]
$list.RoleAssignments.Remove( $user )
0

If you are using the licensed versions, this can be accomplished using the Records Management feature. It is more about declaring the item as a record based on some criteria, and executing the records management rule that would cause that permissions on the item to be effected.

1
  • 1
    But would this not be item based, rather than Web or List based? I mean, can you use it for setting List or Web permissions rather than item permissions? Aug 9, 2013 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.