I'm building a SharePoint app part that will grab information about a particular user. The AD account will be supplied via a Query String and somehow that information needs to get passed into the iFrame. At first I was hoping I could just send the Query String down to the iFrame but it seems like SharePoint restricts access to it from window.parent.URL. My second idea is to have an App Part property that would map the Query String parameter to it.

Does anyone have any ideas on how this could work?

1 Answer 1


Script to get the current page URL(With query-string) from the SharePoint hosted apps.

 var currentPageURL = (window.location != window.parent.location) ? document.referrer : document.location;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.