Office 365 B2B Guest invites with Powershell (without invite email)

Intro add guest user in office 365 with B2B

Sometimes you need to let external users get access to your Office 365 tenant . When this is one user you can just invite the user from the site (Office 365 B2B Guest invites). But what will you do when you need to give access to lots of users without a invite.

In this article i explain how you can add multiple users (10, 100, 1000, 10000 ) as a guest to you office 365 tenant.

First of all you need to do the manual invite Once and give the user you have invite 2 roles.

  1. Usermanagement
  2. Invite guests

The invite guests role explains itself, but you need the usermanagement for changing attributes or removing the user from the tenant.

Ok lets start with Office 365 B2B Guest invites

Invite a users from your source tenant in your destination tenant. When you have done this the user should be in your office 365 tenant under guest with a name like.

user_domain.com#EXT#@j3rmeyerDEV.onmicrosoft.com

When you have checked this you can execute the following command to give the right permissions to that user.

Add-MsolRoleMember -RoleObjectId 95e79109-95c0-4d8e-aee3-d01accf2d47b -RoleMemberEmailAddress “user_domain.com#EXT#@j3rmeyerDEV.onmicrosoft.com”
*note: the invited user gets an email which he needs to accept so for testing purposes give him a Exchange online license.
OK now we have done this you can check this in AzureAD under Map role under the user account and it should be looking like this (sorry for the Dutch).
Untitled
Oke so now we have created a invite account in the destination tenant which is allow to invite users from his Own tenant into your tenant. And the good part is that the users he will invite will not get a Invitation email when you execute the following powershell command.
#Connect to destination tenant with the credential of the inviter account (yes i know you can use a keyfile)
$Username = “Inviteraccount”
$Password = “Inviteraccount password”
$PasswordSecured = Convertto-SecureString –String $Password –AsPlainText –Force
$UserCredential = New-object System.Management.Automation.PSCredential $Username,$PasswordSecured
Connect-AzureAD -Credential $UserCredential -TenantDomain “j3rmeyerDEV.onmicrosoft.com”
#Invite the user
$newuser = New-AzureADMSInvitation -InvitedUserEmailAddress “user2@domain.com” -InvitedUserDisplayName “User2” -sendinvitationmessage $false -InviteRedirectUrl “https://j3rmeyerdev.sharepoint.com”

In a following blog post i will show you how you can easily loop true the users in Activedirectory and add them as a guest without a invite in you Office 365 tenant.

Please follow and like us:

When do i use Onedrive and when to use SharePoint

Often I get the question when you save a file in OneDrive or in SharePoint, this is a common question from customers and colleagues when doing a migration. This is mainly because you can use both platforms to store files and collaborate. Yet there are major differences in the platforms which may affect the way you work significantly.

Save files to OneDrive for business

OneDrive for Business is an application that allows to save files locally and in the Cloud. From OneDrive for Business it is possible to synchronize files across multiple devices and share those files with others.
But when do I put the files in OneDrive for business and when do I store it in SharePoint Online.
Below you find a number of reasons when you use OneDrive:

• If you do not plan to share them with others.
• A small group of people working on files.

When you work on files that are not directly related to a project and are only important for you but you want the ease to share with others. Then you can make the best use of OneDrive.

Save files to a SharePoint team or project site library

A SharePoint site is a place where users can collaborate on files and ideas. The team site is set up so that users of the team site can communicate with each other. In addition, a team site is more like workflows wiki’s and the task functionality so that the team can work better together.

• You want to place a file on the team site when it is important for the team.
• If you want to have more influence on the rights which are distributed.
• If you want to use Workflows for approving documents and other files
• If you expect that all related files of the project are in the team site.
• If you want to use extended metadata and this will trigger a checkin and check out

A Project site is designed so here are the key components to run a project.
• You want to place a file on the project as it is important for the project.
• If you want to have more influence on the rights which are distributed.
• If you want to create tasks for team members which have linked a document.
• If you expect that all related files of the project are in the team site.
• If you want to use extended metadata and this will trigger a check in and check out
• If you want a place where you can run your basic project management and have features like tasks and timeline at your disposal.

In some cases, you can make the best use of Office Groups. The Groups functionality includes a OneDrive for business that focuses on a small set of people. Groups is actually a SharePoint team site with the functionality of OneDrive for Business and SharePoint library. Where you have a calendar, email address and OneDrive will also now added Yammer. In the modern teamsite the Group functions are also offered in a team site.

Please follow and like us:

Restore Office 365 Video Portal Hub

Office 365 changes al the time, I tried to see if I could Disable the Video Portal, to test what happens if you delete de Video Portals.

En my Tenant Admin for SharePoint settings I disabled the Video Portal:

Disable Office 365 Video Portal

I saw my Video app disappear from the App Launcher. Now it is time to delete the site collections.

So at this point I am a Tenant Admin, and I want to clean my Site Collections. The Video Portal creates a few SharePoint Site Collections and one of them is named Hub. This is the main Site Collection for the Video Portal where all your videos are shown.

So I Delete the Video Portal Hub Site Collection. and delete it from the Recycle bin.

Now it is time to recreate this Site Collection? I turned the Video Portal back on using the setting above. I hoped that it would recreate the Hub but that didnt help. Only the Video App in the launcher came back with a nice 404 Page Not Found

The Solution for this issue is to go to the url Bellow

Http://tenant.sharepoint.com/_layouts/15/videoredirect.aspx

This will recreate the hub Site Collection.

Please follow and like us:

Finding the ID for the Site Template in SharePoint online

Finding the ID for you custom template can be hard if you don’t know how to do it.

For this step I prefer to use Google Chrome, Chrome is easier in finding code than IE.

Navigate true the Tenant admin to the site which you want to use as you custom template (when you have saved this this will appear in the TAB custom).

Example https://tenantname.sharepoint.com/_layouts/15/newsbweb.aspx

When you navigate to this URL you will see the section to select a template:

Now as this is open in google chrome right click on your template and click ‘Inspect Element’

You will need to expand the following code and press inspect element.

Once you have expanded the code you will receive the ID associated to the template.

So in my case ‘TestTemplate’ ID is “{6E9A9064-9174-4BEC-9A95-FEF99F7D1CFC}#TestTemplate

Keep in mind you must use the entire code including the name of the template itself and the “{ }”

Please follow and like us:

How to Create Multiple Subsites with Powershell From a CSV file

Sometimes it happens that you need to create Bulk subsites in a Sitecollection. And there is one thing what it-ers don’t like and that is manual work.

With this PowerShell script you can use a EXCEL.CSV to import as many sites as you want.

Step1

First of all you need to install the SharePoint2013 Client Components SDK.

http://www.microsoft.com/en-au/download/details.aspx?id=35585

Step2

The next step is to start up powershell ISE as a Administrator.

Now we need to make a connection to you Office365 admin Tenant with the following command

connect-SPOservice https://tenantname.admin.sharepoint.com

subsite1

Fill in your Office365 administrator credentials and press OK.

Now you are connected to you SharePoint tenant.

Step 3

And we can start editing the script to import the CSV.

Copy the following script in your Powershell script pane.

$csvLocation = “C:\Installt\sites.csv
$template = “template
$siteUrl = “https://tenant.sharepoint.com/sites/sitecollection
$username = “youraccount@tenant.nl”#yourpassword
Add-Type -Path “c:\Microsoft.SharePoint.Client.dll”
Add-Type -Path “c:\Microsoft.SharePoint.Client.Runtime.dll”

$password = Read-Host -Prompt “Enter password” -AsSecureString
$ctx = New-Object Microsoft.SharePoint.Client.ClientContext ($siteUrl)
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
$ctx.Credentials = $credentials
$csv = Import-Csv $csvLocation

ForEach ($site in $csv) {
$site = $($site.collumname of CSV)
$webCreationInformation = New-Object Microsoft.SharePoint.Client.WebCreationInformation
$webCreationInformation.Url = $site
$webCreationInformation.Title = $site
$webCreationInformation.WebTemplate = $template
$newWeb = $ctx.Web.Webs.Add($webCreationInformation)
$newWeb.ResetRoleInheritance()
$ctx.Load($newWeb)
$ctx.ExecuteQuery()

Write-Host “Site created:” $newWeb.Title ” at: ” $siteUrl “/” $newWeb.Url
}

Now you probably wonder what you need top fill in at Template. You can choos a custom template or you can choose one of the template  from the site bellow.

SharePoint online Template codes overview

In the next couple of days i will create another blog about this subject where i show you how to create a Custom template and how you can get the template code of your custom template.

Good luck and don’t hesitate to ask me question about this subject.

Please follow and like us:

How to delete a SharePoint online site with SharePoint Online Management Shell

Connect to your SharePoint Online tenant with the SharePoint Online Management Shell.

Start -> All Programs -> SharePoint Online Management Shell then type:

Import-Module Microsoft.Online.SharePoint.PowerShell

When the Sharepoint online management shell is open and the module is imported we want to connect to our Tenant.

Connect-SPOService
-Url
https://tenant-admin.sharepoint.com
-Credential
username@yourtenant.onmicrosoft.com

When you are connected the first thing to do is run a Get-SPOSite | select URL

This will get u a list of all SharePoint Online Site Collections

022114_0357_removingash1

Now we have all the site collections choose your site collection, to remove the site collection type:

Remove-SPOSite https://tenant.sharepoint.com/sites/siteyouwanttoremove

Once that’s completed the Site Collection will be removed and be put in the Site Collection Recycle Bin for 90 days

Please follow and like us:

Use the latest Features of Office 365 and SharePoint online

Office 365 band SharePoint Online continues to develop and grow this means there are updates coming out everyday, week or month.

Microsoft offers the ability to turn on ‘Preview Features’, Preview Features are the latest changes that haven’t been released yet.

So How do I enable the preview features?

Easy, navigate to your admin tenant (https://yourtenant-admin.sharepoint.com)

preview1

Click Settings, scroll most of the page down and you will see a section called ‘Preview Features’ .

Enable the feature and click OK

preview2

Once done the latest Preview features should be available to you.

Learn more about Preview Features here

Preview Features Office365

You can also enable the preview features of Office365. This will enable lots of preview feutures like (Sway, Delve, and office 2016).

To enable these go to your admin tentant (https://yourtenant-admin.sharepoint.com).

update2

Next klik on service settings and select updates.update3

Now you have the option First Release. You can set this on entire company or you can set up a couple of super users to test with the preview features.

Enjoy your new features.

Please follow and like us:

How to hide the OneDrive Synclink from Navigation and Library’s

A common question that I am asked on a daily basis is how can we hide ‘One Drive’ or ‘Newsfeed’ from the Top Navigation bar?

Well Thanks to an update a few month’s back it’s now extremely simple to do so:

Browse to:

https://companyname-admin.sharepoint.com/_layouts/15/online/TenantSettings.aspx

HideOneDrive

Scroll down to the bottom of your page  Save your changes and you are done

You can also remove Onedrive sync fuctionality from a Document library or another app.

Go to the sitesettings of the library you are in.

3

Select Search and offline availability. And change the Download to offline clients to NO.

searc

offline

Please follow and like us:

How to check and set rights to your recently migrated content With Sharegate

In our last blog i showed you how you can migrate content between site collection. For my test  migrated some content from a users OneDrive to a Site collection of the department the user was in.

When i provided him with the information of the location of his content he notified me that he wasn’t able to see any of his content or documents.

So the first thing i thought ok probably the rights. But the thing was that the user created a subsite in his department where i had put his content. This means that the user is Site owner of that site. Then i realized we migrated his data from his OneDrive where only he had access to so i probably had to set the rights on the folders and content i had migrated.

Check permissions with the Sharegate Security and Management feature.

Go to Sharegate and select security. You will see the following options.

sec mngt1

Then select Check permissions.

sec mngt2

Select the group you want to check

*example
Owner
Publisher
Reader
Etc

Select your target Site, list or directory

sec mngt3

Press View to view the Permissions of that moment.

Set rights to a list or library within a Subsites

To set rights with the Sharegate security an management tool go to security and select add permissions.

sec mngt1

Again select the user or group which you would like to give permissions.

sec mngt5

Select the Role you want to give the user or Group

sec mngt4

Select the target where you want to give permissions

sec mngt3

In my case i selected both options

  • Cascade to children
  • Cascade to Content

I did this because i have one user who doesn’t have rights on his own migrated folder.

sec mngt6

Then press apply to set the permissions that’s it.

This feature i really dummy proof when you want to give easy permissions. Now you don’t have to got to the site, list or library to give permissions.

Source: Sharegate website

Please follow and like us:

Migrate content with Sharegate between Site Collections

If you want to migrate data from site collection to site collection. You can use different methods.

1. Explorer migration.
Simply open the explorer view on both pages and copy past the data.

verkenner

2. Sync all the libraries where you want to put data in.

Simply open the site go to the document library and press synchronize. Once you have done this you can find the sites in your SharePoint favorite in the Explorer on your Computer.

shp sites

I know there are lots more methods to perform a content migration.

ShareGate

What is Sharegate.

*From the sharegate website
Sharegate is built to migrate everything inside out of SharePoint & Office 365. Migrate entire site collections or decide what you want to move: sites, libraries, lists, workflows, Nintex workflows & forms, documents, and much more.

With Sharegate it is really easy to migrate data between site collections and different Office365 tenants.

When you start Sharegate you need to setup the main Office365 tenant to start using sharegate. Once you have done this it wil look like this. (i used my Microsoft live account for my experience)

sharegate1

After when you have connected to you tenant you want to start the migration of content. for this option you choose migration.

sharegate2

You will be redirected to a page with the following notification.

sharegate3

Click Launch Migration to open the Sharegate migration app.
From this point you will be able to navigate thru the site collections or tenants you have add and you can start migrating data between the locations.

screenshot-migrate-everything

With this tool you can migrate whatever you want.

  • Sites
  • Documents
  • Libraries
  • You can import data from a fileshare into SharePoint or Onedrive
  • And you can even Export data from SharePoint or Onedrive to a fileShare

Sharegate has lots of more functions you can check them all out at The Sharegate website. You can also get a free Trial for 15 days.

Please follow and like us: