Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Links to SharePoint from PowerApp not working

I have an PowerApp with a Rich Text field used to submit hyperlinks.  When I click the link from the PowerApps gallery, any link to SharePoint (a site page, a file, an image) receives the error in Picture 1.  All other links work as expected.  If I go to my SharePoint list and click the link on the item, it works as expected.  However, I did notice that beginning of the URL is different from say if I copy the link and put it in an email (Picture 2).SPhelp1.JPGSPhelp2.JPG


Accepted Solutions

This seems to be a known bug with PowerApps.  I ended up using a Html box and set the Default with a "Substitute" function to replace '/sites/' with '' and it now works as expected.

View solution in original post

Community Support
Community Support

Hi @michaele124 ,


From the preview, we can see that there are <p> and </p> at the beginning and end of link. In HTML script, <p> and </p> mean the start and end of the paragraph. They are automatically generated by rich text editor, and it is a laborious duties to remove them.

So I recommand to use Text input box to submit hyperlinks.


Best regards,



Helper I
Helper I

If the <p> is the culprit, why are the only links impacted are those to SharePoint? Any other URL works as expected in the PowerApp, it is just links to SharePoint that have this issue.  If I go to SharePoint and open the item, the link works fine, it is only when accessing the link through PowerApps that it has an issue.


Note: These links also do not work as expected within Power Automation (Flow). The HTML is present when attempting to place them in an email.


The first version of this app used plain text and I was specifically asked to update it so that hyperlinks could be contained within the text boxes themselves as opposed to separately.


I can work around not being able to put videos on SharePoint as there is another host site but what do I do with images if I can't link to SharePoint or a public drive? It seems odd that a PowerApp based off a SharePoint list can't find a folder within the same SharePoint based on what should be a direct link.

Hi @michaele124 ,


If you use launch function to open the link, the culprit is these HTML tags, so use PlainText to clear the tags.

If you use hyperlinks to open the link, you can use HTML editor to display the HTML of Rich Text editor.

Annotation 2019-11-27 153330.png

If these don't satisfy your need, please share more screenshot and details with your app.

Best regard,


Hi @v-siky-msft,


I think the solution may be more complicated. As you can see in the picture, the links are within the gallery as part of a bigger text box and some entries contain multiple links.  Currently the text input within the gallery is an HTML input but in order to get the formatting right, there is a Replace formula that is used to remove <p> tags with "(nothing)" to eliminate line breaks.  Where does the Launch function go? I've never used that myself so I wouldn't have added to the app. Would using that make my SharePoint links work since I am already removing the <p>?


I don't understand why links to anywhere but SharePoint work fine but SharePoint links do not.

Hi @michaele124 ,


Could you copy the link address of hyperlinks in gallery and check if it is the same with the link you entered in the Rich text editor?

How do you get the link of SharePoint sites or image?

I have made a test, and hyperlinks in the gallery can manage to link to the SP image. Please check it:


Note: In your scenario, I think there is no need to remove the HTML tags. The HTML Text can recognize these tags, only the launch function can't.

Best regards,



When I copy the link using the same process you used in the video, the link is pictured in picture PAhelp4.


However, after I submit my form, navigate back to the gallery, and select the item I just created, the link window is changed to "other" and the link is shortened (PAhelp3).


Just to make sure it wasn't something I inadvertently did in the app I forgot about, I tried creating a brand new app and the same issue occurred.

Hi @michaele124 ,


Is there any formulas applied to HTML Text of RichTextEditor?

Could you please reproduce your steps?

Since this function works fine on my side, I need more details to try to reproduce your issue.

Also I suggest you to have a test in the new canvas app, and use HTML Text control to show the RichTextEditor's HTML text to avoid influence of other factors. 


Best regards


@v-siky-msft -  I am having the similar issue with Rich Text editor in PowerApps. All external links copy and paste in the rich text editor are working fine. However, if I copy and paste any link from our SharePoint online site, it's not working. 


Looks like the domain name in the link is changed from "" to   ""


See attached screenshot. 

This seems to be a known bug with PowerApps.  I ended up using a Html box and set the Default with a "Substitute" function to replace '/sites/' with '' and it now works as expected.

View solution in original post

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (77,749)