I'm trying to send an email message using the Microsoft Graph REST API. My application is a service/daemon application where I am sending email on a user's behalf.
I am successfully able to obtain a token and obtain the user object such that I have the user's id, but when I try to use the sendMail API (POST /users/{user id}/sendMail) I receive the following error response:
{
"error": {
"code": "ResourceNotFound",
"message": "Resource could not be discovered.",
"innerError": {
"request-id": "a911ead2-840d-4bfe-9a77-bc5000c1b749",
"date": "2017-01-03T13:33:24"
}
}
}
I also tried to first create the message as a draft using POST /users/{user id}/messages but that also returns the exact same error. My application permissions include both Mail.ReadWrite and Mail.Send.
Related
I'm trying to get the chat messages from MS team channel using API.
https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/messages
It works in graph explorer and returns the list of all chat messages. But when I hit the same API within Postman it return the following error:
I have consented all the required permission in azure app. What else am I missing here. Has anyone faced similar issues?
Please let me know.
{
"error": {
"code": "UnknownError",
"message": "",
"innerError": {
"date": "2021-04-20T04:01:46",
"request-id": "e32d3a2e-001c-4478-8c9c-8d5ff0c5e125",
"client-request-id": "e32d3a2e-001c-4478-8c9c-8d5ff0c5e125"
}
}
}
list channel messages is under protected API in MS teams. Before calling this API with application permissions, you must request access. To get the access you have to apply request access form
I am trying to get the subject (ex. Maths 1) of an online TEAMS meeting via Microsoft Graph API.
When i send a request to https://graph.microsoft.com/v1.0/communications/callRecords/8f4477a7-f5b2-40ed-a165-95519825c9cg in the response there is no value for the subject of the meeting.
So my next move is to send a request to https://graph.microsoft.com/v1.0/communications/calls/8f4477a7-f5b2-40ed-a165-95519825c9cg because the Graph API documentation has the property 'subject' in the response. When i send this request i get this response:
{
"error": {
"code": "UnknownError",
"message": "",
"innerError": {
"date": "2021-02-10T12:32:19",
"request-id": "9a81a114-8a58-457b-929v-390bda79669g",
"client-request-id": "9a81a114-8a58-457b-929a-490bda79669g"
}
}
}
with a response status code : 500 Interval Server Error from the Graph API.
I have tried this request with different meeting ids but the result is the same.
My API permissions are these:
API Permissions
I would appreciate it if I had a solution to my problem or some other way to find the subject of the meeting.
The reason why you are getting that error is because you are querying the teams meeting as a resource of type 'call' instead of 'event'.
Please use GET https://graph.microsoft.com/v1.0/users/{id |userPrincipalName}/events/{id} using Calendars.Read Application permission when querying as an application or GET https://graph.microsoft.com/v1.0/me/calendar/events/{id} with the Calendars.Read delegated permissions when querying as a signed-in user.
For further reference, have a look at https://learn.microsoft.com/en-us/graph/api/event-get?view=graph-rest-1.0&tabs=http
I am trying to send a message or reply to a message using Graph APIs for MS Teams. I have the correct permissions set and also have access to Protected APIs (if thats a concern).
The APIs I use to send messages are for both channel and 1:1 chat message.
POST URL Request:
https://graph.microsoft.com/beta/chats/{chat-id}/messages/{message-id}/replies
https://graph.microsoft.com/beta/chats/{chat-id}/messages/
https://graph.microsoft.com/beta/users/{user-id}/chats/{chat-id}/messages/
https://graph.microsoft.com/beta/teams/{team-id}/channels/{channel-id}/messages/{message-id}/replies
https://graph.microsoft.com/beta/teams/{team-id}/channels/{channel-id}/messages
Permissions set are ChannelMessage.Send, Group.ReadWrite.All, ChatMessage.Send for both delegated and application level.
I use a 2-step process to authorize the client /authorize and then /adminconsent.
When trying to post message I always get "UnknownError" and empty message with 401 status code.
{
"error": {
"code": "UnknownError",
"message": "",
"innerError": {
"date": "2020-07-10T04:58:06",
"request-id": "ff58128b-585b-4242-99c4-011c8e537d94"
}
}
}
Is this some issue with my app or from MS graph side?
Issue was with the access token. Using app-only permissions to send message is not supported.
Ref: https://github.com/microsoftgraph/microsoft-graph-docs/issues/8998
Hello I am getting several skip token errors when running a full import on the graph API.
here is the error
The following one looks like expiration of skiptoken. Graph connector uses skip token in different cases. I would communicate with Graph API team to understand if this is correct behavior for the API.
Message: Error during http call. HttpStatusCode: BadRequest;
url: https://graph.microsoft.com:443/v1.0/groups/5802115b-ef14-4572-bec1-9a4747e5bcfb/members/?$select=id&$skiptoken=X%2744537074090001000000000000000010000000D6203A9D758C6F4B887B307BA3302EB5000000000000000000000017312E322E3834302E3131333535362E312E342E323333310000000000000157F232736047814E848C20B3547FF5E8%27;
Response: {
"error": {
"code": "Directory_ExpiredPageToken",
"message": "The specified page token value has expired and can no longer be included in your request.",
"innerError": {
"request-id": "1489b123-f94c-4531-82d1-d4b76331e3eb",
"date": "2017-11-27T18:59:23"
}
}
}
Message: Error during http call. HttpStatusCode: Unauthorized;
"code": "Authentication_MissingOrMalformed",
"message": "Access Token missing or malformed.",
The application has full control over all objects so it should not get an error with permissions issues
I am attempting to create a new list item in SharePoint Online using the [beta] Microsoft Graph endpoint. The goal is to call Microsoft Graph from an Outlook Add-in but the problem persists on Postman.
When I call the endpoint as per the documentation I get the following error message:
{
"error": {
"code": "unauthenticated",
"message": "The caller is not authenticated.",
"innerError": {
"request-id": "bb094f39-71c9-4c7d-9d9b-913cc9622baf",
"date": "2017-08-08T11:32:02"
}
}
}
I'm using ADAL JS to fetch the authentication token and I initialized my AuthenticationContext with my tenantID. My app has the following permissions: offline_access, Sites.Read.All, Sites.ReadWrite.All, User.Read
2nd Edit - more details on readItem
I use the https://graph.microsoft.com/beta/sites/{site-id}/lists/{list-id}/items endpoint with the {site-id} of my desired site from /sites and the {list-id} of the list from /sites/{site-id}/lists but this is the empty response I get:
{
"#odata.context": "https://graph.microsoft.com/...",
"value": []
}
If I try to to add /{item-id} to my original call to access specific item I receive this response:
{
"error": {
"code": "itemNotFound",
"message": "The specified list was not found",
"innerError": {
"request-id": "6e7ccae3-3aee-4dbb-ae3e-de61250478e0",
"date": "2017-08-09T13:13:33"
}
}
}
Which doesn't make sense because I can retrieve valid information about the list if i make the call without /items/..
Any and all input appreciated :) I'll gladly provide more code, this is all I deemed relevant and didn't want to overcrowd the post.
might be that you actually don't have an item with that id, since https://graph.microsoft.com/beta/sites/{site-id}/lists/{list-id}/items/1 works for me.
test the id's you really have by just https://graph.microsoft.com/beta/sites/{site-id}/lists/{list-id}/items and each item returns it's id.