Outlook Client plugin/addin URL Redirection - outlook

I can't seem to redirect to a specific web url using outlook client plugin/addin. Example I have https://test.com/#/players/test-url/true bind to my 'displayLink' button, whenever I click the button it redirects to me to this url https://test.com. Why does it remove the /#/players/test-url/true? Do i need to configure my manifest file to allow it to redirect to a specific URL? My Office version is 1807 (Build 10325.20082)

It seems that some version of outlook client doesn't support URL fragment. So what I did I converted the URL into tinyURL, I used this to create the URL.

Related

Teams Tab API access to Sharepoint FIle Contents causing 405 on OPTIONS call

In Microsoft Teams, I have crated an App that lists files of a certain type in a Tab
The use case is that the contents of the file need to be read by my Javascript
the Javascript in the Tab already successfully gets an ID Token and Access Token (via ADAL)
this code already successfully lists the DriveItems in the group the current logged in user can see
via https://graph.microsoft.com/v1.0/groups/${groupId}/drive/root/search(q='{pdf}');`
when I attempt to GET the DriveItem via
https://graph.microsoft.com/v1.0/groups/${groupId}/drive/items/${itemId}/content
where the itemId is returned from the first call
I successfully see the HTTP 302 from the https://graph.microsoft.com endpoint redirecting to https://<thesharepointsite>.sharepoint.com/<etc>
Axios (and the Microsoft Graph Javascript API) are successfully traversing to the redirect
Postman, with the same https://graph... URL with the AccessToken successfully downloads the binary content from the 302 redirect (so it is not an Auth issue)
PROBLEM
in Microsoft Teams, inside my Tab, the browser (built inside of the Teams desktop app) HTTP calls to https://<thesharepointside>.sharepoint.com respond with a 405 error on the OPTIONS call
usually this means there is a CORS issue, and so the solution is to add the domain to the validDomains of the app
Attempted Solution
the Manifest has the following entries in validDomains
"validDomains": [
...
"*.sharepoint.com",
"graph.microsoft.com",
"login.microsoftonline.com"
]
manually add the full domain the the Teams App's Manifest
use the suggested "{teamsitedomain}" as per https://learn.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema#validdomains
*.sharepoint.com as per above
use the Microsoft Graph Javascript APIs
In all instances, I get 405 on the OPTIONS call
No file download from within the Tab within Microsoft Teams.
Suggestions?
THIS MAY answer your question in the future
my code now does a https://graph.microsoft.com/v1.0/groups/${groupId}/drive/items/${itemId}
this is an Instance of DriveItem and returns a property on the JSON response:
#microsoft.graph.downloadUrl
as per Microsoft Graph API Download File content return Unauthorized 401 this is a short-lived URL you can traverse without Auth headers
the content of my file was returned successfully (no CORS issue)
I can now download the contents of the DriveItem within a Tab
I hope this helps someone

Cookies Not Being Sent via Firefox's Downloads API in Extension

I am attempting to write a Firefox extension which downloads files.
The website that I'm trying to download the files from requires cookies to be passed to GET requests, otherwise a 403 is returned.
I can visit the URL that I'm attempting to download the file from in the browser, and the file will load correctly, indicating that my cookies are correct.
I can also, using my extension, issue GET requests to an authenticated-only API from the same domain and receive the correct response (indicating that cookies are passed correctly).
However, when I attempt to download a file from a url using Firefox's downloads API (browser.downloads.download), the download fails (I get a 403), because the cookies aren't being passed. I have confirmed this with Charles Proxy.
The Mozilla Documentation says "If the specified url uses the HTTP or HTTPS protocol, then the request will include all cookies currently set for its hostname"; my url uses HTTP.
Why aren't the cookies being passed?
I'm using Firefox Developer Edition (68.0).
It was a Firefox bug in versions 67-69.
https://bugzilla.mozilla.org/show_bug.cgi?id=1555591

Windows - Get the URLs passed by the computer?

In Windows how to retrieve the URLs passed by the computer? I mean any URLs browsed by the web browsers. The reason is I have an installer which sends an HTTP POST via an URL to the web server. However I do not have the source code of the installer. How to get the URL passed by this installer?

Google OAuth 2 authorization - Error: Redirect Uri Mismatch

JSON File
{"web":{"auth_uri":"https://accounts.google.com/o/oauth2/auth",
"client_secret":"c-kaafSexciO7It3QcKxx3BO",
"token_uri":"https://accounts.google.com/o/oauth2/token",
"client_email":"xxx678964-tjkl572knihtgocll9tnadvsdngmnld6#developer.gserviceaccount.com",
**"redirect_uris":["http://www.alfrosia.com"]**,
"client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/798911678964-tjkl572knihtgocll9tnadvsdngmnld6#developer.gserviceaccount.com",
"client_id":"xxx1678964-tjkl572knihtgocll9tnadvsdngmnld6.apps.googleusercontent.com",
"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs",
"javascript_origins":["[http://www.alfrosia.com][1]"]}}
I am specifying proper redirect url in the json file above, but during authentication it is giving wrong url message on browser. While I have given, this as Redirect Uri in json file.
In the error message it says that
redirect_uri=http://localhost:57826/authorize/
is uri_mismatch while I have not specified it in json
But Google OAuth2 authorization Failed ,this error message occurs during authentication process
- Error: redirect_uri_mismatch.
Request Details
scope=https:[//www.googleapis.com/auth/youtube.readonly][3]
response_type=code
redirect_uri=http://localhost:57826/authorize/
access_type=offline
pageId=none
client_id=xxxxx964-tjkl572knihtgocll9tnadvsdngmnld6.apps.googleuserconten
redirect_uri must exactly match what you have set in the Google Developer console. My guess is that your code / client library / IDE is automatically setting the redirect URI based upon the url you are browsing from.
Visual studio for example has a habit of randomly changing the port.
Option 1:
Fix your redirect uri in the Google developer console to
http://localhost:57826/authorize/
option 2:
assuming you are using visual studio fix the project settings so it stops adding a random port.
option 3:
assuming you are using java or visual studio IDE that may be adding this random port. Create a Client ID for native application instead of a Client ID for web application and use that for testing on local host. Do not release Client ID for native application to your live webserver.
"localhost" is not working in Google developer console.
Try 127.0.0.1 as redirect URI and don't use symbols in the URI.

too many sessions created by Spring MVC

I'm using Spring MVC, MySql and Tomcat 7.
Currently the application I'm developing can be accessed by 2 URLs namely IP:PORT/APP and www.app.com.
When accessing via www.app.com I see a session being created for every page/link that I open but it doesn't happen when I access via IP:PORT/APP.
I have a check for logged-in user in every page and due to too many sessions that check is failing and I'm being re-directed to my login page even after logging in.
Also when opening the www.app.com index page I see a jsessionid on the address bar and not when i open it via IP.
Any help/guidance is appreciated.
It seems that when you are accessing the page via domain name (www.app.com), cookie support is not found and hence the url rewriting is being done (i.e. appending jsessionid at the end of the url). But this is not observed while accessing the same page via IP Address (IP:PORT/APP), meaning cookie support is enabled at this time.
You can check if you have enabled some security settings that is not allowing cookies.
Further to this, it seems that even url rewriting is not helping as sessions are being created for every request.
You can use some HTTP Interceptors to analyze the request being sent and response being received in each case. You can use Developer Tool in Chrome to inspect this. Load you page in Google Chrome, Right Click on Page and Click 'Inspect Element'. Open the 'Network' tab. Reload the page. You can now inspect the HTTP Request Headers sent and Response Headers received for each request. Analyze the difference between the request using IP Address and requests using Domain Name.
Also, share the architecture of the application and the environment where you are testing the application.

Resources