Employees of your organization can't use Microsoft Stream service until their accounts have been licensed. You can assign Microsoft Stream licenses to them so each user does not have to manually sign up for the service.

This article explains how you can use PowerShell commands to efficiently assign licenses to unlicensed users, especially multiple user accounts. The article first shows how to obtain basic license information in your tenant and then shows how to assign Microsoft Stream licenses to a group of users.

Note:

You need to be in admin role to perform operations described in this article for your tenant.

Prerequisite

Install and set up the Windows Azure AD Module. For instructions on how to do it, see Manage Azure AD using Windows PowerShell.

1. Connect to you tenant

To begin, you need to use the Windows Azure AD Module to connect to your tenant by running the commands:

Import-Module MSOnline
Connect-MsolService

You'll be prompted to provide a username and password. Make sure that you use a Global Administrator account. This will authorize you to access and administer your Azure AD tenant.

Assign license

2. Get unlicensed users

Get a list of unlicensed user accounts by running this command:

Get-MsolUser -All -UnlicensedUsersOnly

The command returns information about any users who are not currently licensed for Microsoft Stream. For example,

Assign license

As you can see, there are 4 unlicensed users (and 1 external Admin, which we can ignore for the purpose of this article).

If you use the Get-MsolUser cmdlet without using the All parameter, only the first 500 accounts are returned.

In the following example, we use the Get-MsolAccountSku cmdlet to see the available licensing plans and the number of available licenses in each plan in your organization. The number of available licenses in each plan is ActiveUnits - WarningUnits - ConsumedUnits.

Get-MsolAccountSku

The command returns data similar to this:

Assign license

3. Assign Microsoft Stream License

There are 2 ways to assign licenses to every user. You can bulk assign Microsoft Stream licenses to everyone using the following cmdlet (this command assumes that the UsageLocation for all the employees has been defined correctly.) The following example is assigning licenses to all unlicensed users whose Usage Location is "US".

Get-MsolUser -All –UnlicensedUsersOnly  -UsageLocation "US" | Set-MsolUserLicense -AddLicenses "StreamDev:STREAM"

Assign license

Once you have assigned licenses you can verify by running the Get-MsolUser -All cmdlet. It will show results similar to this:

Assign license

You can also verify that the consumed units count has been increased by 4.

Assign license

One thing to remember, if you have created a new user account, generally those user accounts don't have a UsageLocation value, and this would prevent them from getting a license assigned.

Note:

UsageLocation is a pre-requisite to having a license assigned.

To set the UsageLocation value on an account, use the following cmdlet

Set-MsolUser -UserPrincipalName "<Aaccount>" –UsageLocation <CountryCode>

Alternately, as an admin, if you want to assign a Microsoft Stream license to individual users, you can run the following cmdlet

Set-MsolUserLicense -UserPrincipalName user1@contoso.com -AddLicenses contoso:STREAM

Now, all your users will be licensed with Microsoft Stream and will be able to sign-in directly at Microsoft Stream.

For information on how to block Microsoft Stream for users, see this article.

See also

Blocking sign-ups for Microsoft Stream in the organization

Understand privacy settings

Get started