Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to view Inbox #258

Closed
garimak29 opened this issue Jun 12, 2018 · 8 comments
Closed

Unable to view Inbox #258

garimak29 opened this issue Jun 12, 2018 · 8 comments
Assignees
Labels
Area: rest Feedback on REST API/Graph content Needs: author feedback Waiting for author (creator) of Issue to provide more info

Comments

@garimak29
Copy link

I am getting below errors after signing in.

Error: C:\Users\garkumar\Node-work\mails1\node-tutorial\views\error.hbs: Can't set headers after they are sent.
at validateHeader (_http_outgoing.js:494:11)
at ServerResponse.setHeader (_http_outgoing.js:501:3)
at ServerResponse.header (C:\Users\garkumar\Node-work\mails1\node-tutorial\node_modules\express\lib\response.js:767:10)
at ServerResponse.send (C:\Users\garkumar\Node-work\mails1\node-tutorial\node_modules\express\lib\response.js:170:12)
at done (C:\Users\garkumar\Node-work\mails1\node-tutorial\node_modules\express\lib\response.js:1004:10)
at C:\Users\garkumar\Node-work\mails1\node-tutorial\node_modules\hbs\lib\hbs.js:93:9
at Object.done (C:\Users\garkumar\Node-work\mails1\node-tutorial\node_modules\hbs\lib\async.js:74:20)
at C:\Users\garkumar\Node-work\mails1\node-tutorial\node_modules\hbs\lib\hbs.js:88:18
at C:\Users\garkumar\Node-work\mails1\node-tutorial\node_modules\hbs\lib\hbs.js:69:11
at Object.done (C:\Users\garkumar\Node-work\mails1\node-tutorial\node_modules\hbs\lib\async.js:74:20)
at C:\Users\garkumar\Node-work\mails1\node-tutorial\node_modules\hbs\lib\hbs.js:64:20
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)

@jasonjoh jasonjoh self-assigned this Jun 12, 2018
@jasonjoh jasonjoh added Status: under investigation Issue is being investigated Area: rest Feedback on REST API/Graph content triaged labels Jun 12, 2018
@jasonjoh
Copy link
Contributor

I'm sorry to hear that. It looks like you're following along with the Node tutorial. Can you try the finished sample I have posted at https://github.com/jasonjoh/node-tutorial and see if you get the same error? I've tried to force error conditions and cannot reproduce what you're seeing.

If the finished sample works for you, try comparing your version with that one to see if you can spot a difference.

@jasonjoh jasonjoh assigned garimak29 and unassigned jasonjoh Jun 12, 2018
@jasonjoh jasonjoh added Needs: author feedback Waiting for author (creator) of Issue to provide more info and removed Status: under investigation Issue is being investigated labels Jun 12, 2018
@garimak29
Copy link
Author

The tried the finished sample, now I am able to see the inbox without any errors but it is not fetching the username and not the emails either.

@jasonjoh
Copy link
Contributor

Can you explain more detail what's not working? Also, are you logging in with an Outlook.com or an Office 365 account?

@garimak29
Copy link
Author

I implemented your finished sample with the steps you have provided in [https://github.com/jasonjoh/node-tutorial]. After signing in my OUTLOOK account in place of username I'm getting 'undefined' (in debug as well), when I go to Inbox to view the emails fetched, there also the value is coming "null".

@jasonjoh
Copy link
Contributor

Ok. Let's verify that your account works with the Microsoft Graph. Can you go to the Graph Explorer, login with the same account, and run the default query using the Run Query button? What is the response?

@garimak29
Copy link
Author

I performed below steps :

  1. I clicked on the Graph Explorer Link provided by you.
  2. Signed in to my outlook account.
  3. Agreed to the permissions.
  4. Clicked on Run Query button.

Please find the response I'm getting, below :
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users/$entity",
"id": "e9754b849d7066c8",
"userPrincipalName": "garima.kumar29@outlook.com",
"businessPhones": [],
"displayName": null,
"jobTitle": null,
"mail": null,
"mobilePhone": null,
"officeLocation": null,
"preferredLanguage": null
}

As you can see all the responses that I am recieving is null.

@jasonjoh
Copy link
Contributor

Ok. This could either be normal or a problem with your specific account.

  • Go to https://account.microsoft.com/profile/ and sign in. Do you have a name listed there? Fields will be null if they have no value set there, and things like officeLocation just don't exist on personal accounts.
  • You said the listing of mail was coming back null as well. If you run the query in Graph Explorer for https://graph.microsoft.com/v1.0/me/mailfolders/inbox/messages, do you get any results? Assuming no, if you login to https://www.outlook.com, are there any messages in your inbox?

@garimak29
Copy link
Author

You were right, when i signed in https://graph.microsoft.com/v1.0/me/mailfolders/inbox/messages my name was missing and as soon as I added that it fetched all the required details.
Thanks a ton !! 👍

@ghost ghost locked as resolved and limited conversation to collaborators Jul 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: rest Feedback on REST API/Graph content Needs: author feedback Waiting for author (creator) of Issue to provide more info
Projects
None yet
Development

No branches or pull requests

2 participants