Microsoft Graph API read mail status code 404 not found error despite despite consented permissions - outlook

When using the Microsoft Graph API endpoint /v1.0/me/messages, I'm presented with a 404 error despite consented with Mail.Read permission.
{'error': {'code': 'ResourceNotFound',
'message': 'Resource could not be discovered.',
'innerError': {'date': '2021-06-02T13:25:37',
'request-id': '8e12f76c-dc76-407e-8d74-71cb319f7637',
'client-request-id': '8e12f76c-dc76-407e-8d74-71cb319f7637'}}}
I've granted Mail.Read permission in Azure portal.
I've tried the same Graph Explorer, and it works fine.
enter image description here
Any suggestions on how to get a 200 OK instead?
EDIT 1:
Currently, my access token allows me to get my profile through endpoint /me. However, if I try to use /me/mailFolders or /me/messages to get my mails I get the error above.

Related

I am getting Google OAuth2 callback error 403

Very, very new to user authentication. Looking to allow users to register with Google.
Current status: I'm successfully making it to this step
But, when I click an account, I'm getting this error 403

google oath API with python

hello i tried launching python gmail API on my localhost but this error prevent me from authorizing and collect user tokens
credential.json correct
Authorized redirect URIs empty
Authorized JavaScript origins empty
You can’t sign in because geko sent an invalid request. You can try again later, or contact the developer about this issue. Learn more about this error
If you are a developer of geko, see error details.
Error 400: redirect_uri_mismatch

Why my Graph API / cancel outlook meetings call returns always 404 error

I am trying to get all events associated with a user (in order to cancel them). Here is the API doc
I am able through Powershell and Graph API to see a user, and also to sign out this user with the API.
I am using a token got from oauth2 protocol, with grant type client_credentials. I put the permission "Calendars.ReadWrite".
But I only get 404 errors when trying to get the events with :
Invoke-WebRequest 'https://graph.microsoft.com/v1.0/users/864abe35-a43f-44c3-9d24-ea7d2ce53907/events' -ContentType 'application/json' -Method Get -Headers #{Authorization = "Bearer $token"}
This strange thing is that I can get the user array, or revoke his session...
Do this endpoint not working ?
Thank you
EDIT : Answer was that when a user does not have mailboxes, events URL does not exist, and lead to a 404. It works with user having mailbox.
Please provide the full response (with error message etc.).
Have you granted admin consent to Calendars.Write?
In the azure portal, go to Home > App registrations > your app registration and then click on "API permissions". I don't think this is the issue but better to be safe than not. I would rather expect a 403 Forbidden if this is the problem.
Are you sure that the guid of the user is correct? Check if the user with this Id exists in your tenant.
Has the user a valid licence?
Check if the user has a calendar. Use Get calendar.
Maybe the user has only group calendar(s). If this is the case, you need Group.Read.All or Group.ReadWrite.All.
Try to get oulook meetings from a user where you are sure that he has a calendar.
Finally, it appeared that the accounts who do not have any exchange mailbox will not result with an empty return, but with an unexisting URL (that's explains the 404).
It works with an account which holds a mailbox.

403 Forbidden Error on CodeIgnitor web app

Permission page
I'm trying to allow my app to work be able to allow users to login via LinkedIn, however i keep getting the 403 Forbidden Error as shown in the screenshot.
Hopefully someone can advise.
The error message clearly says that you do not have enough permission to use LinkedIn API. You need to request permissions from linkedin.

laravel authantication error with google API

I have been using Socilte Package for users login, I am using Facebook and Google.
Facebook is working fine but Google API is not working,
Showing an error while returning from Google.
403 - Forbidden
The Web server is configured to not list the contents of this directory or you do not have enough permissions to access the resource
Error is similar to this post
But I didn't found solution in this post. Google+ API is also enabled and no issue with credentials.
Domain is verified.

Resources