SharePoint Embed web part re-writing my URL - sharepoint-online

SharePoint Online: Until yesterday, I was able to use the standard Embed web part to display an iFrame to my SSRS Report server that included the control settings in the URL to hide toolbar, etc.
Like this:
<iframe src="https://reports.mydomain.com/ReportServer?/Reports/WallChart_GP&rs:Command=Render&rc:Toolbar=false&rs:ClearSession=true" height="400" width="300"></iframe>
Today, that is suddenly resulting in "Reporting Server Error: The operation you are attempting on item '/' is not allowed for this item type. (rsWrongItemType)". However if I put the URL directly into a browser I get the correct result... report with no toolbar.
When I switch the SharePoint page to edit mode and look at the Embed web part, I see that it's changing my & to & plus "amp;" for HTML formatting. If I paste that modified string into a separate browser I do still reach the report but the server ignores at least some of my commands in that I then see the report server toolbar despite setting it to false. So I don't know if it's always changed my URL like that, or if that is indeed the source of my problem. But I had not even re-published my pages in SharePoint.
If I put an embed string in the SharePoint web part that does not attempt these report server commands, I do get the report as desired. For example this displays my report in the SharePoint web part (but with the toolbar that I'm trying to avoid showing):
<iframe src="https://reports.mydomain.com/Reports/Pages/Report.aspx?ItemPath=%2fReports%2fWallChart_GP" height="400" width="300"></iframe>
The thing that has me bring this here is the fact that it was working up until yesterday. Nothing was changed on either end. I suppose Microsoft Support may be the correct avenue but I'm concerned that I will just be told that I can't do it without regard to the fact that it worked all along.
Any insight into why this is now different or what I can do to resolve the problem?

Related

How to make Powerapps work with Param function in Web Part

I am trying to create a powerapps web part that will open a specific screen from a canvas app using parameters. I have added the web part and added the power apps web link to it. When I enter &parametername=parameter nothing shows up. I can enter the web link and parameters directly into a browser window (tried in Chrome and Edge) and the app will display properly. I can also created a button in a web part and added the link to it and it will also display the app when the button is clicked. The app is working properly with no errors, it will just not show up in the web part when the parameters are added to the link (If no parameters are added to the link, everything will display fine).
I am trying to create a powerapps web part that will open a specific screen from a canvas app using parameters. I have added the web part and added the power apps web link to it. When I enter &parametername=parameter nothing shows up. I can enter the web link and parameters directly into a browser window (tried in Chrome and Edge) and the app will display properly. I can also created a button in a web part and added the link to it and it will also display the app when the button is clicked. The app is working properly with no errors, it will just not show up in the web part when the parameters are added to the link (If no parameters are added to the link, everything will display fine).
I was struggling with this myself; just figured it out.
You need to put the full URL with parameters in to the "App web link or ID" property for the PowerApp web part. Be careful because the first parameter needs to be prepended with ? not &. The ampersand is used for additional, following parameters after the first parameter.
Note that I have omitted my TLD from this screenshot, however you will want to substitute your own here.
The example URL syntax given by Microsoft is https://apps.powerapps.com/play/{App ID}?{Query}. For me that URL looks something like this:
https://apps.powerapps.com/play/f813580f-3182-90b0-b3a9-781cfb288808?linkId=checkIn
I have one URL for checkIn and another for checkOut that I can use to display different forms.
My primary mistake was that I was only pasting my appID into the "App web link or ID" field rather than the entire URL. Remember, you can edit your Canvas Form, click on "Share" and get the Web Link from this page. This contains the full URL, minus your custom parameters. Play around with the full URL plus parameters until you get something that the web part will accept.

Outlook Add-in : Not getting Outlook Addin RoamingSettings on OWA after saving the same in Outlook Client

I am building an outlook-addin which saves the data in the RoamingSettings.
Using the code :
Office.context.roamingSettings.set('key1', 'AmIABug');
Once I save it in RoamingSettings my assumption is that when I open an email on the OutlookWebApp. It will immediately pull that save value when I request for it.
Office.context.roamingSettings.get('key1');
However this is not the case.
First, considering that there is an issue with RoamingSettings : Pointed out here.
Why Outlook's RoamingSettings object initialized with old values after page re-load/ redirect?
Which I was able to overcome with the work around mentioned:
https://github.com/joeparzel/RoamingFix
which seemed to work properly on the Outlook client, however Now. I am using the OutlookWebApp and what I see is that even when I have the OutlookWebApp already open I do not see the new RoamingSettings values when requested even when I close the TaskPane on one email and open the same using another email.
If I refresh the page I get the expected output. Can someone please tell me if RoamingSetting for OWA is only set once when the page loads, unlike the thick client where if I reopen my task pane, it gets the latest values.
In may have I missed something silly, please help.
This is the expected behavior. OWA only loads RoamingSettings once which is why when you reload the page you get the new values. Also note that since you are using a thick client to set the properties and the thick client by default runs in cached mode, there may be cases where you might not get the properties back on owa even after reload for some time since the properties haven't been synced back to exchange from thick client yet. Once thick client's sync kicks in, you should be able to see the props in OWA after a reload.

Excel Hyperlink adding redirectURL

I'm creating a hyperlink in excel
=HYPERLINK("https://www.redacted.com/index.html?Display=GroupMeetings/index","link")
When I click on this link it changes the Url to
https://www.redacted.com/index.html?redirectURL=Display%3DGroupMeetings%2Findex
if I change the URL to have ?Displayy= with two y's it does not add the redirectURL attribute. I cannot find any documentation about why this is added. Anyone know why?
The end goal is to deep launch users to specific pages within the application via a hyperlink in excel.
Do the users need to be authenticated to view the pages you are sending them to?
If so the cause may be this (taken from this answer on super user https://superuser.com/a/445431/154198):
Clicking a URL in Excel seems to open it in your default browser. But that's not really true. Before opening it in your browser, Excel first runs Microsoft Office Protocol Discovery. This uses a Windows/Internet Explorer component to determine if the URL works. (It does not identify itself as Internet Explorer, but as "User Agent: Microsoft Office Existence Discovery".) And if the results are (somehow) okay then it will open the result of that check in your default browser.
Microsoft have issued a fix for this KB218153 - which can be found here:https://support.microsoft.com/en-gb/help/218153/error-message-when-clicking-hyperlink-in-office-cannot-locate-the-inte
This may not be your specific problem, but it is at least worth knowing about.

404 error being generated on controller actions that use [HttpGet] when clicking on a hyperlink?

Background
I have an ASP.Net Core v2.0 web application that has the [HttpGet] attribute above action results that don't need to accept a post.
I created a spreadsheet with a list of pages on the website to my marketing team, along with a column of hyperlinks that link directly to each page on the website.
Example Spreadsheet:
Issue
Once the marketing team started clicking on the links in the spreadsheet, I started to receive 404 errors via email (configured using NLog) although the page did still load for the user.
Troubleshooting
I troubleshooted this and uncovered that the issue was down to the [HttpGet] attribute. If I take the [HttpGet] attribute out, clicking on the links in the spreadsheet doesn't generate a 404 error.
The site doesn't generate 404 errors when loading the page (s) via the browser.
I installed fiddler and it looks as though Excel is using the "CONNECT" method.
Fiddler screenshot:
I thought this could be the issue as it's not a GET but when I access a page within Chrome, it also shows using the "CONNECT" method in fiddler.
I'm looking to see if anyone else has had this issue and if they got around it? Do I need to add another attribute alongside [HTTPGet] to stop Excel or other 3rd party software causing a 404?
I've resolved my own issue.
For anyone else that has this issue the fix is to put [HttpGet, HttpHead] as the attribute. If you have a custom route then add another attribute underneath:
[Route("[controller]/custom-action")].
For info, I got to the bottom of this by using the logs from the drop down ASP.Net Core Web Server in the output window in Visual Studio. I could see that when the link was first being requested by Excel, it was using the HEAD method rather than the GET which is why a 404 error was being fired.
Hope that helps someone down the line.

Excel links to JIRA issues forcing re-authentication

Situation
Attempting to launch a JIRA issue hyperlink from Excel 2013 drives the user to a login page for JIRA which is unexpected as the user has an active login session.
Example link format --> https://<subdomain>.atlassian.net/browse/<proj-#>
Even if the user logs in the first time, checks the box for "Keep me logged in" the user still must repeat this the next time a JIRA link from Excel is selected.
The URL appends the parameter &permission-violation=true
Attempts to Debug
Copy the link to clipboard and paste directly in browser URL bar. This method does not generate the permission violation. User can go directly to issue without logging in again.
Attempt the link in a different Office 2013 application. Using the same link from a MS Outlook 2013 email does not generate the permission violation.
Browse the JIRA administration page for solutions. Could not find any such option to configure.
Tested with both Firefox and Chrome set as the default browser. Issue persists for each.
Any suggestions to fix this? The behavior is very frustrating to our end users.
The Problem
According to StackOverflow user myroslav, certain versions of Excel are first attempting to fetch the webpage using a Microsoft DLL that does not know about your browser's cookies (i.e. your login session). Here's an excerpt of his answer:
If session cookie protects website Hlink naturally is being redirected
to login page and having reached HTML page and not able to
"understand" it opens it in external browser. Note that it opens not
original URL (expected behavior) but the result of redirect, even if
it was 302 redirect.
His full answer can be read here.
The Solution
At this time, Microsoft has recommended that companies with single sign-on sites like Atlassian's should address the issue on their end. Such a fix is low on Atlassian's priority list. In the meantime, we are left to either accept Microsoft's solution - modify the registry as myroslav instructs and accept a loss of Excel functionality - or modify our URL to something that doesn't require single sign-on user validation.
The Workaround
I'm using Excel 2016 and Chrome. Taliesin's workaround, elsewhere on this page, did not work for me, but might work for some. Here's a next-best-thing workaround that did work:
HYPERLINK("https://<subdomain>.atlassian.net/issues/?jql=id%20in%20("&<cell>&")", "link")
Replace <subdomain> with your Atlassian subdomain, and <cell> with the cell containing your JIRA issue key.
This URL variant opens a search query for issues matching the given key. It doesn't take you directly to the issue, but it at least offers a convenient link to get where you want to go, which is at least better than entering your credentials on the login page again.
Try restarting the browser and login to JIRA by selecting keep me signed in
It seems to resolve the issue: https://www.redmine.org/boards/1/topics/14287?r=40540
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\"YOUR OFFICE VERSION"\Common\Internet]
"ForceShellExecute"=dword:00000001
Workaround
Ok. So I have discovered a workaround. Note this will correct the issue in an indirect way by leveraging JIRA's own link correction behavior. Essentially, you can bypass the security issue by providing JIRA with an incorrectly structured URL. JIRA will then fix the URL and redirect you to the correct page.
Here is the structure https://<subdomain>.atlassian.net/browse/<proj-#> + /
Note the last forward slash. This does not belong in the URL construction but when used will establish the redirect and thereby bypass the security violation.
If you already have your hyperlinks in a JIRA file you can easily update those in batch by using this simple VBA code subroutine.
Sub AppendJiraLinks()
Dim c As Range
Dim i As Integer
For Each c In Selection.Cells
If c.Hyperlinks.Count >= 1 Then
For i = 1 To c.Hyperlinks.Count
c.Hyperlinks(i).Address = c.Hyperlinks(i).Address & "/"
Next i
End If
Next c
End Sub
Note this code could be enhanced but works fine for my purposes.

Resources