Sharepoint Error – User Not in Directory

Had an odd one today. An internal user with permissions to a Sharepoint site was getting the error “user not in directory”. Searching Google comes up with many different options and reasons for this error, but no concise cause / solution.

The user was able to login to Office365 webmail normally without any errors and was had a Sharepoint license for several weeks and hadn’t reset their password recently.

Eventually, I had the user un-invited and then re-invited and it worked!

Trouble With Running Microsoft eDiscovery Export Tool

I ran into this one yesterday. I was attempting to export a PST file with the findings of a compliance search within Office365. I couldn’t run it on my computer, nor the server where I was offloading the PST to. The error I got was simply “Make sure the export content hasn’t expired”.

Helpful. It obviously hadn’t expired.

Eventually I did the following: First, I started using Internet Explorer to do the export. Next, I found this Microsoft help doc that stated to add the following websites to the trusted or intranet zone in IE.

*.outlook.com, *.office365.com, *.sharepoint.com and *.onmicrosoft.com are added to the Local intranet zone trusted sites.

Voila! That did the job and my PST downloaded nicely.

MailboxImportRequest Fails

I ran into an issue with a Powershell script I wrote recently, where I received this error:

The name must be unique per mailbox. There isn’t a default name available for a new request owned by mailbox xyz

Basically, a record is kept for completed mailbox move requests, and if you do too many for one mailbox, you get the above error. Don’t worry! Just run the following command in PS to clear away the completed request records, and you’ll then be able to run the import request!

 

Get-MailboxImportRequest -Status Completed | Remove-MailboxImportRequest

That’s it!

Converting an Office365 Recipient Mailbox to a Shared Mailbox

Quick and easy tip today. A user left the company and to free up the license used on Office365 but keep the user’s mailbox, you can easily convert the mailbox to a shared mailbox, which you don’t get charged for on Office365.

Basically, go into Exchange Admin Center > Recipients > Choose the Mailbox you want to convert  and on the right side, click “Convert to Shared Mailbox”

 

That’s it!

How To: Disable Clutter in Office365

To disable Clutter in Office365 via Powershell, simply do the following:

Connect to Office365 Powershell for your account

Then simply run this command to disable Clutter for all mailboxes:

Get-Mailbox | Set-Clutter –enable $false

That’s it! If you want to disable Clutter for a single mailbox, you can do the following:

Set-clutter -identity user@email.com-Enable $false

To do this via the Office365 Portal, just navigate to: Mail > Automatic Processing > Clutter and turn it off!

Allow External Senders to Send to an Office 365 Distribution List

Simple one here – a VIP relies on a Gmail account when the company is on Office365. To allow the VIP to send to a distribution list, I had to do the following:

1) Open Exchange Admin Center
2) Click on Recipients and then Groups
3) Select the distribution group
4) Click the edit button edit icon

distribution-groups-list

5) Click Delivery Management and select “Senders inside and outside of my organization

delivery-management

6) Then just click Save! save button

You can also use this area to block or allow certain senders to distribution lists by adding emails to the box below.

 

How to Find Last Logon Time for Exchange Mailbox Users

The last logon time of an Exchange 2010/2013/2016 mailbox user can easily be found by running the Get-MailboxStatistics cmdlet in the Exchange Management Shell.

 

You can further sort the info by including and running the following command:

Get-MailboxStatistics -Server EXCH | Sort LastLogonTime -Descending

And export it to a CSV by adding an Export-CSV option like below:

Get-MailboxStatistics -Server EXCH | Sort LastLogonTime -Descending | Export-CSV c:\lastlogon.csv

Editing Calendar Permissions in Office365 via Powershell

First you need to connect to Office365.

Next, simply run this commandlet:
Add-MailboxFolderPermission calendar@company.com:\Calendar User guy@company.com AccessRights Author

Your accessrights options are: Owner, PublishingEditor, Editor, PublishingAuthor, Author, NonEditingAuthor, Reviewer, Contributor, AvailabilityOnly, LimitedDetails

If you’d like to get permissions, you can simply use:
Get-MailboxFolderPermission Identity calendar@company.com:\Calendar User guy@company.com

Finally, to remove permissions:

RemoveMailboxFolderPermission Identity calendar@company:\calendar user dude@company.com

Disable the Calendar on a User or Shared Mailbox In Exchange

This works for Office365 or an internal Exchange server to disable the calendar on a Shared Mailbox or User’s Mailbox. First, you’ll have to pull up the Exchange Management Shell. Then run the following commands:

New-OwaMailboxPolicy –Name “New Policy Name”

Creates a new mailbox policy


Set-OwaMailboxPolicy –Identity “New Policy Name” –CalendarEnabled $false

Sets the calendar for all mailboxes under the policy to be off

Set-CASMailbox –Identity “shared mailbox” –OwaMailboxPolicy “newpolicy”

Applies the policy to the mailbox in question

 

Exchange 2010 Add Mailbox Folder Permissions including Subfolders

I was asked by a user today for access to a specific folder in an old user’s mailbox within Outlook. There were no free computers and so the easy way out of setting up Outlook with the mailbox was not an option. I fired up Google and found this handy script for use in the Exchange Console:

ForEach($folder in (Get-MailboxFolderStatistics AliasofSharer| Where { $_.FolderPath.ToLower().StartsWith(“/Invoices“) -eq $True } ) )
{
$foldername = “AliasofSharer:” + $folder.FolderPath.Replace(“/”,”\”);
Add-MailboxFolderPermission $foldername -User AliasofRequestor-AccessRights PublishingEditor
}

  1. Change the name of the folder to be shared to where Invoices is here: ‘FolderPath.ToLower().StartsWith(“/Invoices“)’
  2. Change ‘AliasofSharer’ to the alias of the user who will be sharing the folder
  3. AliasofRequestor is who will be given access to said folder
  4. In the above example I’ve used PublishingEditor but this can be changed as required.