locked
Microsoft Azure with Microsoft Graph RRS feed

  • Question

  • Hello,

    Currently I am implementing a rest web-service where i want to read emails of an office 365 account users in my tenant using Microsoft graph. And I want to read emails and attachments by username filter.

    Please find below configuration steps which i performed till now :-

    1. I have registered an application under Azure Active directory. also created client secret and add application permission for daemon service to read emails. Application access is defined as multi-tenant directory as of now.
    2. I have tried to generate access and refresh token using https://login.microsoftonline.com/{tenant_id}/oauth2/token from postman rest client with body params like grant_type = password, client_id, client_secret, scope, resource, username and password. then i tried to reset password from Azure Active Directory for this account but it not allowed.
    3.  Firstly i tried with my custom domain login credentials but is fails with error :   "error_description": "AADSTS50056: Password does not exist in store for this user.\r\nTrace ID: be810185-6b2d-47c9-9f99-dd56f3a1b000\r\nCorrelation ID: 83f754ee-21d9-4dc6-ad59-ffe64ec924ef\r\nTimestamp: 2019-11-29 06:52:19Z",
    4. Then I created new user from Azure Active Directory which takes domain as NETORGFT5672423.onmicrosoft.com. then I have reset password. then try step3 with this account username and password. and it works.
    5. But when i try read emails or users it fails with error : "code": "ResourceNotFound", "message": "User not found".

         Note I have created both the users in same organisation.

          Please let me know how can i go ahead and suggest if i need to look into different direction. I am struggling with this from        last few days. Please help me out with the solution if any. 

    Thank you,

    Rakesh Sorathiya.

          



    Friday, November 29, 2019 7:08 AM

All replies

  • Hello,

    Currently I am implementing a rest web-service where i want to read emails of an office 365 account users in my tenant using Microsoft graph. And I want to read emails and attachments by username filter.

    Please find below configuration steps which i performed till now :-

    1. I have registered an application under Azure Active directory. also created client secret and add application permission for daemon service to read emails. Application access is defined as multi-tenant directory as of now.
    2. I have tried to generate access and refresh token using https://login.microsoftonline.com/{tenant_id}/oauth2/token from postman rest client with body params like grant_type = password, client_id, client_secret, scope, resource, username and password. then i tried to reset password from Azure Active Directory for this account but it not allowed.
    3.  Firstly i tried with my custom domain login credentials but is fails with error :   "error_description": "AADSTS50056: Password does not exist in store for this user.\r\nTrace ID: be810185-6b2d-47c9-9f99-dd56f3a1b000\r\nCorrelation ID: 83f754ee-21d9-4dc6-ad59-ffe64ec924ef\r\nTimestamp: 2019-11-29 06:52:19Z",
    4. Then I created new user from Azure Active Directory which takes domain as NETORGFT5672423.onmicrosoft.com. then I have reset password. then try step3 with this account username and password. and it works.
    5. But when i try read emails or users it fails with error : "code": "ResourceNotFound", "message": "User not found".

         Note I have created both the users in same organisation.

          Please let me know how can i go ahead and suggest if i need to look into different direction. I am struggling with this from        last few days. Please help me out with the solution if any. 

    Thank you,

    Rakesh Sorathiya.

          

    We are using Email Essentials for the same




    Friday, November 29, 2019 7:21 AM