Let’s get started
Please enter your work or school account to get started.
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.
Install and set up the Windows Azure AD Module. For instructions on how to do it, see Manage Azure AD using Windows PowerShell.
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.
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,
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.
The command returns data similar to this:
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"
Once you have assigned licenses you can verify by running the Get-MsolUser -All cmdlet. It will show results similar to this:
You can also verify that the consumed units count has been increased by 4.
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.
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 firstname.lastname@example.org -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.