Skip to content
Big Eric's Place

Big Eric's Place

My take on SharePoint, Office 365 and other things…

Tag: iframe

Posted on January 16, 2019January 16, 2019

Remove the authentication prompt for embedded PowerApps

The world of PowerApps can be new and exciting, not to mention completely frustrating! A lot of my frustrations come from my lack of knowledge of the product but there are times when it’s not that, but an issue with the Office 365 platform itself.

This brings me to my issue I was having when embedding PowerApps onto an Office 365 modern SharePoint page. I had saved and published my form, and all seemed well. It displayed perfectly or me, all controls worked, etc. I had someone on my team test and suddenly, something was amiss.

My tester said that they were being asked for credentials. But why? Why would I ever need to provide my login information again after I have already logged in to 365? If you don’t know what I’m talking about or haven’t been fortunate yet to see this screen, this is what it will look like:

I thought that I did something wrong, so I began my favorite past time of searching the innerwebs to see if I was the only one or not. Luckily for me, I wasn’t. I came across the following community post stating the exact same issue I was having: https://powerusers.microsoft.com/t5/Administering-PowerApps/Embedding-PowerApp-into-Sharepoint-site/td-p/157116

This post mentions that if you receive the connection permission sign in pop up, that it is possible to bypass it by running the following PowerShell command bout having to run a PowerShell command:

Set-AdminPowerAppApisToBypassConsent

Now, don’t do what I did and run this command expecting everything to work all nice and stuff. There are a number of steps you need to follow before you can even run this command. That being said…….. Let’s do this!!!!

We will be using the SharePoint Online Management Shell to run this command but before we do, we will need to import the required Cmdlets for PowerShell. This blog post expands on all of the PowerShell cmdlets: https://powerapps.microsoft.com/en-us/blog/gdpr-admin-powershell-cmdlets/

After you download and extract the files, open the SharePoint Online Management Shell. Make sure that you ‘Run as Administrator’.

Next, navigate in PowerShell to the directory where you extracted the files and run the following script:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
dir . | Unblock-File
Import-Module .\Microsoft.PowerApps.Administration.PowerShell.psm1 -Force
Import-Module .\Microsoft.PowerApps.PowerShell.psm1 -Force
Add-PowerAppsAccount

Sign in to your tenant using your admin account. ***Note: Your admin account must be using a role that is both the PowerApp publisher and an o365 Global Admin.

Once you have run the script and have signed in to your tenant, you are now ready to use this command:

Set-AdminPowerAppApisToBypassConsent -AppName xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

If you notice, there is a GUID used to identify the PowerApp. The easiest way to get the App ID (GUID) is to login to the PowerApps Admin Center. Once there, find the specific PowerApp that you are working with and click on it to see the details. At the bottom of the screen you should see the App ID. Copy the GUID next to that and place next to –AppName in your script.

You can also use this PowerShell command, Get-AdminPowerApp, but for me this is a slower process because I’m having to look through the many line items. I’ve always been more of a GUI type user, so really it’s just a preference.

Once run, you will see the following output on your screen:

That’s it! No more prompt!

Stay Salty!

Share this:

  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Pinterest (Opens in new window)

Like this:

Like Loading...

Follow me on Twitter

My Tweets

Amazon Hope Missions

Sardis Baptist Church

Bible Belt Outdoors

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 162 other subscribers

Tags

  • 365
  • Access
  • Active Directory
  • Active X Control
  • AD
  • Administration
  • Attachments
  • Calculated Column
  • Calendars
  • CEWP
  • Conditions
  • Contact Selector
  • Content Editor Web Part
  • Dataview Web Part
  • Date Picker
  • Document Library
  • Folder
  • Hosts
  • InfoPath
  • InfoPath 2013
  • jquery
  • Lists
  • MOSS
  • Office
  • Office 365
  • PowerShell
  • Preceding-Sibling
  • Repeating Section
  • Repeating Table
  • Rules
  • Script Editor
  • SharePoint
  • SharePoint 2007
  • SharePoint 2010
  • SharePoint 2013
  • SharePoint Designer
  • Sites
  • Style
  • url
  • Web Parts
  • Webservice
  • Windows 7
  • Workflows
  • XML
  • xPath

Archives

  • June 2019
  • January 2019
  • March 2018
  • September 2016
  • May 2016
  • January 2016
  • August 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • September 2013
  • July 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • September 2011
  • March 2010
  • February 2010
Proudly powered by WordPress
%d bloggers like this: