I have been using outlook rest api's to read/create/update calendar events of outlook account.
Followed all the steps https://dev.outlook.com/RestGettingStarted/
It works very well for the subscription account's.
But the api does not work to load the calendar events of my personal outlook account ex: phani.xxx#outlook.com.
API responds with below error:
"error": {
"code": "ErrorMissingEmailAddress",
"message": "When making a request as an account that does not have a mailbox, you must specify the mailbox primary SMTP address for any distinguished folder Ids."
}
I have tried the same with outlook sandbox got the same response.
Any help on this to get this api working for any outlook account. Will be highly appreciated.
This is likely due to your account not yet being enabled for the REST API. There's an issue with the v2 endpoint not returning the proper error message in this case.
Related
I've been using Azure Active Directory and adal.js to authorize web apps client side and it's worked great. Recently had a request to have user photo instead of a generic user icon.
I added Microsoft Graph permissions to the app registration. And tried to get a token for the user photo request like...
authContext.acquireToken('https://graph.microsoft.com', callback);
Which resulted in the response_type 'token' is not supported for the application error. So I found ADAL JS - response_type="token" is not supported suggesting setting "oauth2AllowImplicitFlow": true in the app manifest, which I did. Now I get Token renewal operation failed due to timeout error.
I've also added 'https://graph.microsoft.com': 'https://graph.microsoft.com' to the endpoints prop of the context config.
What do I have to do get this working? Way too much time spent just trying to get users' photos. Thanks.
I'm working on a C# project that use Gmail API in single-user mode to retrieve user's mail. The application is working nicely.
Recently, we got a strange behavior from this API. When the user hasn't a #gmail account with Gmail disabled and try to use our product, for some we got a "Bad Request 400" with "Mail service not enabled" exception and for other users, we got "Bad Request 400" with "failedPrecondition" exception.
The users are on the same domain name. I searched through Gmail API documentation and I found nothing that can explain this.
Our thoughts are that maybe some users have different settings in their Google account that can cause the "general" "failedPrecondition".
Any advice?
Thanks
I'm trying to implement checking availability for specific user (actually a room) in O365 calendar. I'm using Graph API as it's recommended by Microsoft.
My first approach was using POST on https://graph.microsoft.com/v1.0/me/findMeetingTimes with the message body prepared according to template given in Graph API Explorer. On the API Explorer everything seems to work fine but when I try to run exactly the same request with my applications token I receive 403:
{
"error": {
"code": "ErrorAccessDenied",
"message": "Access is denied. Check credentials and try again.",
"innerError": {
"request-id": "b130177d-e138-4cc7-8e72-5d3529a9dc24",
"date": "2017-03-21T08:47:10"
}
}
}
I checked the app's delegated permissions in AAD and they seem to be fine. For Microsoft Graph those are granted:
Calendars.ReadWrite.Shared
Calendars.Read.Shared
Calendars.ReadWrite
Calendars.Read
I get exactly the same response (403) when I try to simply list user's events: https://graph.microsoft.com/v1.0/users//events In Graph API Explorer 500 is returned.
I found the following bug description: https://github.com/microsoftgraph/microsoft-graph-docs/issues/559 (and probably this one too) Is it related with the issues above?
Any clue what I might be doing wrong?
Is there any other way to achieve the same using different endpoint or API assuming that I still want to use oAuth for authorization?
I will be grateful for any hint
Update: Outlook Calendar API seems to work. Still appreciate any ideas why Graph API doesn't?
The FindMeetingAPI needs A work or a school account . If you are logging in using your personal email ID , you might not be able to login. Moreover , you need to set permissions to Calendars.Read Calendars.Read.All Calendars.ReadWrite User.Read"
I am attempting to get a list of mail delegates for each user within a domain on gmail to display to our users at www.rulerr.com . I am authenticating as a service account with domain wide delegation. I pull a list of users, and then authenticate using the service account as each user in the domain to access their gmail data.
Unfortunately it looks like I cannot access delegation information with the latest API, but the functionality exists in the old (now deprecated) API. When will this functionality be moved to the latest API? Or is there a different endpoint that I should be using?
I have also attempted to work around this by delegating user B's gmail to user A, authenticating as user A and then attempting to list messages within user B's mailbox which results in an error:
{ [Error: Delegation denied for <email redacted>]
code: 403,
errors:
[ { domain: 'global',
reason: 'forbidden',
message: 'Delegation denied for <email redacted>' } ] }
Thanks for your help.
As of now we will just have to wait for the Gmail API to add the delegation feature from the deprecated Email Settings API:
Managing delegation
settings
Delegation settings are not yet available via the API.
Disclaimer: I work on Gmail and the Gmail API platform.
Managing Delegation Settings
We're happy to announce that we have now released the new Gmail API delegate settings methods, effectively replacing the long since deprecated Email Settings API delegation settings methods.
You can now use the standard libraries and tools found at https://developers.google.com/gmail/api to interact with the new Gmail delegate settings methods.
We will be publishing a blog post at https://gsuite-developers.googleblog.com raising the visibility of the new delegate settings methods in the coming weeks, but I wanted to personally give you a courtesy heads-up.
Documentation
Overview/introduction guide:
https://developers.google.com/gmail/api/guides/delegate_settings
Reference documentation: https://developers.google.com/gmail/api/v1/reference/users/settings/delegates
Migration guide (from the deprecated Email Settings API delegation settings methods):
https://developers.google.com/gmail/api/guides/migrate-from-email-settings#managing_delegation_settings
is it possible to load emails sent to google group via API?
I can see something like that in Gmail API: https://developers.google.com/gmail/api/v1/reference/users/messages/list
but not sure if it will work for google groups.
When I tried it I just got "Delegation denied for..." error.
What I need is to periodically load emails (possibly with attachments) from more google groups (so it is not convenient to resend all emails to some regular gmail address...) - any ideas?
Thanks
For the question is it possible to load emails sent to google group via API?
I think there is no API that allows reading a message in Google Group.
So the alternative way is to use a Gmail account which is a member of that group. By using this Gmail you can check all the message that is sent to that group.
About the Delegation Denied error, this message will be sent if the initiator, in response to a credential request message, is unwilling to generate the requested credential.
Check this SO question for more information.