Giter VIP home page Giter VIP logo

Comments (13)

jasonjoh avatar jasonjoh commented on July 20, 2024

Are you saying this only happens on these specific messages? What I would look at here is the token you're using. The URL should not matter here since outlook.office365.com and outlook.office.com are both valid hostnames for the Outlook REST API.

I would get the token from both clients for the same message, then parse it using https://jwt.io and look for differences.

from outlook-add-in-command-demo.

abhishek1234321 avatar abhishek1234321 commented on July 20, 2024

Yes, it happens to specific messages. So I did compare the decoded data using https://jwt.io

The HEADER:ALGORITHM & TOKEN TYPE is same.

Whereas 2 things differ in the PAYLOAD:DATA

For Outlook 2016 Mac it was

"exp": 1516302672,
"nbf": 1516302372

For OWA it was

"exp": 1516303253,
"nbf": 1516302953

Does this matter?

from outlook-add-in-command-demo.

jasonjoh avatar jasonjoh commented on July 20, 2024

No, those are timestamps for the lifetime of the token (nbf = "not before", exp = "expires"). I'd expect those to be different.

Could you post the full body of the error? There's usually a request ID included. If not there it might be in the response headers.

from outlook-add-in-command-demo.

abhishek1234321 avatar abhishek1234321 commented on July 20, 2024

request-id: 1bd8d15e-203d-4a4b-a925-4ed9f1fd8af6

is this what you need?

from outlook-add-in-command-demo.

jasonjoh avatar jasonjoh commented on July 20, 2024

I hope so :). I tried to reproduce this and could not, the token from Mac Outlook worked fine for me. However, the Uber receipt emails that I have don't have attachments, so I don't know if that's the key to your repro.

from outlook-add-in-command-demo.

abhishek1234321 avatar abhishek1234321 commented on July 20, 2024

So the map in Uber receipt is considered as an attachment by outlook attachments API.

If you wish to repro, I could send you an email with the link to manifest.xml file and you can see console logs of the error then?

Let me know.

from outlook-add-in-command-demo.

jasonjoh avatar jasonjoh commented on July 20, 2024

Actually could you post the full set of response headers from a request that gives the error? I'm working with engineering to see if we can determine what's going on from our telemetry.

from outlook-add-in-command-demo.

abhishek1234321 avatar abhishek1234321 commented on July 20, 2024

So I used to inspect element in Outlook for Mac using this

defaults write NSGlobalDomain WebKitDeveloperExtras -bool true

from here https://stackoverflow.com/questions/47920619/outlook-add-in-not-displayed-in-mac-os?rq=1

But this no longer seems to work, I am unable to find the option to inspect anymore. I updated outlook for mac a few days ago.

screen shot 2018-01-22 at 9 18 38 pm

I will try to get the data using Vorlon JS. Is there any way to get the inspect element working again?

from outlook-add-in-command-demo.

jasonjoh avatar jasonjoh commented on July 20, 2024

Hmm, no idea to be honest. I see that the poster added a second post here: https://stackoverflow.com/questions/48074433/outlook-add-in-not-work-with-angular-routing-under-mac-oshigh-sierra-10-13-1

What you might try to make it easier is just copy the token out and then use it with Postman to send the same request your add-in does.

from outlook-add-in-command-demo.

abhishek1234321 avatar abhishek1234321 commented on July 20, 2024

This was the attachment GET call
https://outlook.office.com/api/v2.0/me/messages/AAMkADRhZTE1Y2QxLWQ0YjQtNDczYS1iMGM0LTljNjE2ZDdlOWEzNABGAAAAAACJCq1z65ziQJtWHUC8GhiHBwA2e2AaQ4VLQorLqTK0zxHhAAAAAAEMAAA2e2AaQ4VLQorLqTK0zxHhAAAD4sgsAAA=/attachments

Here is the response headers

Content-Length →0
Date →Mon, 22 Jan 2018 17:30:07 GMT
Set-Cookie →exchangecookie=2bdc4e8acf684a26a4c81db8adc9cab4; path=/
WWW-Authenticate →Bearer client_id="00000002-0000-0ff1-ce00-000000000000", trusted_issuers="00000001-0000-0000-c000-000000000000@*", token_types="app_asserted_user_v1 service_asserted_app_v1", authorization_uri="https://login.windows.net/common/oauth2/authorize", error="invalid_token",Basic Realm="",Basic Realm="",Basic Realm=""
X-BEServer →MAXPR0101MB1594
X-BackEndHttpStatus →401
X-BackEndHttpStatus →401
X-CalculatedBETarget →MAXPR0101MB1594.INDPRD01.PROD.OUTLOOK.COM
X-CalculatedFETarget →MAXPR01CU001.internal.outlook.com
X-DiagInfo →MAXPR0101MB1594
X-FEProxyInfo →MAXPR01CA0035.INDPRD01.PROD.OUTLOOK.COM
X-FEServer →MAXPR01CA0035
X-FEServer →MA1PR01CA0093
X-MSEdge-Ref →Ref A: 890FD2934AC6472C954A28015F3D6ECA Ref B: MAA01EDGE0219 Ref C: 2018-01-22T17:30:08Z
X-Powered-By →ASP.NET
request-id →3b7b93e0-3fa9-4e26-a19e-c321317ae1d4
x-ms-diagnostics →2000002;reason="The token has expired.";error_category="invalid_lifetime"

So this is throwing 401 instead of 403, couldn't repro the 403 error in postman yet.

But the same call with a token from OWA works fine.

from outlook-add-in-command-demo.

jasonjoh avatar jasonjoh commented on July 20, 2024

Cool thanks. As a quick test, what happens in Postman if you just ask for the item (take off /attachments) with the same token. Also 401?

from outlook-add-in-command-demo.

jasonjoh avatar jasonjoh commented on July 20, 2024

Quick update - I did find an Uber email with the map, and I see it as an attachment. I don't reproduce the 403 error though in Mac (16.10 (180114)). I suspect you may have got the 401 in Postman if you waited too long. Those tokens aren't as long-lived as a normal token (I think it's 10 minutes?). I'd really need to see 403 response headers for us to see the problem.

from outlook-add-in-command-demo.

abhishek1234321 avatar abhishek1234321 commented on July 20, 2024

I am unable to repro this now, looks like it started working somehow. I tried removing the /attachments, it works fine.

Will keep you posted if this comes up again.Thanks for all the support.

from outlook-add-in-command-demo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.