Trial Environments for Power Apps Training

Want to get hands on with the Power Platform but don’t have access to an environment? Well, you can sign up for a free trial instance that provides 30 days access to various Power Platform platform components. Once set up, you can build Canvas or Model Driven Power Apps, Power Automate Flows, or a Power Apps Portal.

If you want guided training, Microsoft offers a series of events called App In A Day (AIAD). Power Platform AIAD partner led training sessions have become very popular, and for good reason – they provide a hands on introduction to the Power Platform led by excellent trainers.  And it’s all free!  If you can’t attend a session in person, you can just download the labs from this link and work at your own pace. Whether attending or working at your own pace, a Trial environment is usually required if you don’t have access to a Power Platform sandbox.

This post will provide some instructions for setting up your Office 365 and Power Platform trial environment. This is not an overly complex process, but it can be a bit confusing, depending on your level of experience.

You may also take on the role of instructor, whether for the AIAD or for internal team training. This means ensuring your attendees have an environment where they can work on their labs or other projects.

One option here is to have each attendee set up their own trial. Again, not overly complex, but it will depend on the audience and your time available. So another option is pre-deploying a series of environments for your attendees.

So we will first take a look at the steps available to set up an individual Office and Power Platform trials. From there, we can look at how to set up a batch of 20 additional trial environments for a group of attendees.

Creating Office 365 PowerApps Trial Environments

The AIAD Trainer package includes instructions on setting up the free Trials. You will first set up a Office 365 E3 Trial and then add a Power Apps Plan 2 Trial to the new subscription. When I delivered the session, I reworked the notes a bit as the process had changed since originally written and some of the attendees were a bit confused. These notes also encourage attendees to use non work email address for the trial. This ensures they have the appropriate access to work the labs and protect from inadvertent changes to work subscriptions. The updated steps are:

Sign Up For Office 365 E3 Trial account at the following link – Office 365 E3 Trial

Welcome!
Welcome, let’s get to know you

We recommend you not use your work Office 365 email address to avoid confusion.  For example, I used an Outlook.com email address.  This email will be used to send you the new account details.

Create your user ID

Choose a unique name for your account. For a real instance, this would be your company name.  For our labs, you might choose something like admin and aiadrestontest:

User ID and password

You will receive a validation code to… Prove. You’re. Not. A. Robot.

Prove it!

Once you complete this step, you should receive an email with your account info.

Login to your new Office Trial account and use the following link set up the PowerApps trial – PowerApps Plan 2 Trial Offer

Check out

Here you just need to choose Try now!

Order receipt

From here, click the link to the Users page. It may take a moment or two to load.

Active users

Select the menu next to the key icon by clicking the vertical ellipses and choose Manage Product Licenses.

Licenses and Apps

In the Account details pane to the right, select Licenses and Apps.  Check the Microsoft PowerApps Plan 2 item and choose Save.

You should now be able login to the Power Apps portal at https://make.powerapps.com/home

Create additional Users and Environments

If you are just looking for an environment for your personal testing, you are all set! You have a new Office 365 and Power Apps trial with 25 available licenses. However, if you would like to set up multiple environments, you have more work to do. You could have each attendee repeat the steps above either before the session or as part of the lab prep. This can be challenging for some and may take time out of your training session.

Another option is to build out new Environments for each of the 24 additional licenses provided with this trial. You would need to do the following:

  • In the Office Admin center, Create a new User
  • Assign the Office and Power Apps licenses
  • In the Power Apps admin portal, create a new Environment
  • Assign the new User admin rights to the Environment
  • Provision a new Database for the environment

This can be a time consuming so the AIAD Trainer pack also included some Power Shell scripts to automate the steps above. The script creates new user accounts with random names, assign licenses, creates a new Environment and CDS database for each. Once created, your attendees can simply login with the new user credentials and work on their own labs or sample projects. I would love to find the original author to give them credit since it’s a big time saver and also a great example of some of the ALM capabilities.

The script does some really cool stuff but it came with a few issues. I’ve updated this script to fix a few issues found with the original version. When I first attempted to run the scripts, I was unable to authenticate to my new account. This was because of a few updates to the Power Platform and was relatively easy to fix.

Over the last few months, I’ve made some additional updates to address some issues and to make it easier to use. For example, you can pass the user name and password rather than being prompted each time. The script will now only create Trial environments by default, instead of the original Trial and Production Pairs. Recent changes cause failures when creating more than 10 Production environments, likely because of storage limitations being enforced.

I’ve also added exception handling. In the original script, errors were being swallowed inside of one of the loops. While testing, I thought the script was just running super slowly, but it was actually in a loop continuing to throw errors. I kicked off the script on one environment and stepped away from my machine, not realizing that I was basically hitting the server over and over again with exceptions. The cool thing? Microsoft watches for these errors!

The embarrassing bit? I know this because the engineering team saw the name of the account, realized that it was for AIAD, and reached out to the AIAD management team who contacted me. The engineering team wanted to know what the heck I was doing! I felt a bit silly but they were all very nice nice about it. I explained that I was running this script and I shared it with them, and they offered some advice on updates.

It turns out that I was seeing errors because before running any automated PowerShell scripts against a new tenant, you must login at least once to the https://make.powerapps.com site. The engineering team said that they planned on addressing this in the future, but for now, you must login at least once before running the PowerShell script.

You can find the script, and a document with the steps outlined in the previous section, on Github at http://github.com/jamesnovak/setupaiad. I’ve included some notes to the ReadMe page outlining the command line parameters and their usage. Running the script should be fairly straightforward even if you are not a developer:

  • Download the entire repository, including child folder scripts
  • Open PowerShell and change directory to the download folder
  • Run the SetupAIAD.ps1 with the relevant parameters

For example, using the account described in the Trial instructions:

.\SetupAIAD.ps1 -TargetTenant 'aiadrestontest' -UserName 'admin' -Password 'password' -TenantRegion 'US' -NewUserPassword 'Password!' -UserCount 20 -MaxRetryCount 3 -SleepTime 5

In this example, the script would create 20 user accounts, user1 through user20. Each account will have an Office and Power Apps license assigned and login credentials like: user1@aiadrestontest.onmicrosoft.com and Password! as their password. Once the users login, they will see an Environment corresponding to their username, such as User1-Dev with a provisioned CDS database. The new user should have administrative access to the Environment. I’ve found this to be a nice time saver when setting up a many accounts at once!

NOTE: If you re-run the script, it will DELETE these existing environments. I have not added logic to check for the accounts and add missing. That might be a nice feature for a future version, but for now, my intention with this script an clean setup. This method also restarts the 30 day Trial period on the Environments.

I have a few additional parameters to add, such as whether to create Production environments. You can make some simple updates to the scrip to enable this now, but you may hit limits at 10 user accounts.

I plan on keeping this script and attached document up to date, but if you have any other suggestions, feel free to add an Issue or drop me an email!

Summing up

We now have instructions on how to create a new Office 365 and Power Apps Trials that provide full access to Power Platform components. We can also quickly create batches of 20 or so logins at a time on these new trials with a PowerShell script.

So if you have a group of 40 people attending an AIAD session or an internal training session, you can create two Trials and run the PowerShell script twice. Last week, I was providing some training for a group and created 80 accounts (4 trials, 4 runs of the script) in about 20-25 minutes. Much faster than manually setting all this up!

I hope this helps you kick off your own AIAD session or internal Power Platform brown bag sessions for your team! As always, any comments, questions, and suggestions are welcome.


Leave a Reply

Your email address will not be published. Required fields are marked *