Power Apps URLs and the TenantID Parameter

I had a colleague recently ask me about the “TenantID” value that you’ll find in your Power Apps URLs whenever you navigate to the “Details” of the app, and look for the “Web link.” The question was around whether it was truly necessary to include it when sharing the URL with others.

For reference (Pattern of URL):

Often, when we’re sharing and/or reusing URLs, it’s common to shorten them to what is absolutely essential, and so the question stemmed from whether the TenantID was unnecessarily cluttering up the URL.

Should you remove the TenantID from your Power Apps URL before sharing?

You can remove “TenantID” from this URL and have it still work for most users, but there is a drawback to doing so. If the user you are sharing it with has multiple Office 365 accounts, it’s possible they may be logged into a different tenant than the one your app resides in, in which case the environment and application won’t be found, and the user will be presented with this error:

This is precisely why the “TenantID” is so important; without it, Power Apps is simply going to look for the designated Environment and Application within the tenant the user is currently logged into. By including “TenantID” in the URL, however, the UI can determine that the logged in user isn’t logged into the correct tenant, and they’ll instead be greeted with:

While relatively simple in nature, I hope this post has been helpful in explaining why you should refrain from shortening your Power Apps URLs and leave the TenantID querystring parameter when sharing it with users.


Matt Jimison

Microsoft 365 Geek - Husband, father, lover of basketball, football, smoking / grilling, music, movies, video games, and craft beer!

Leave a Reply

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