I successfully created an online meeting with the following API.
POST https://graph.microsoft.com/beta/communications/onlineMeetings
Content-Type: application/json
{
"startDateTime":"2019-09-09T14:33:30.8546353-07:00",
"endDateTime":"2019-09-09T15:03:30.8566356-07:00",
"subject":"Application Token Meeting",
"participants": {
"organizer": {
"identity": {
"user": {
"id": "550fae72-d251-43ec-868c-373732c2704f"
}
}
}
}
}
But when I am trying to delete the meeting its not working. I tried with the following APIs:
DELETE https://graph.microsoft.com/beta/me/onlineMeetings/{meeting id}
and
DELETE https://graph.microsoft.com/beta/{user id}/onlineMeetings/{meeting id}
Please help.
The api documented here works for me, eg:
DELETE https://graph.microsoft.com/beta/me/onlineMeetings/550fae72-d251-43ec-868c-373732c2704f_19:meeting_M2IzYzczNTItYmY3OC00MDlmLWJjMzUtYmFiMjNlOTY4MGEz#thread.skype
I get an http 204 in response.
Note that even after deleting the meeting using the above api, I am still able to join the meeting from the teams client, this may be a different bug perhaps. However, trying to delete the same meeting id again gives a 404 not found, which is expected.
Related
I'm having an issue where i'm receiving a general exception when trying to create site pages through Microsoft Graph API beta endpoints even in Graph Explorer, I'm at a loss at what it could be as i'm using the sample provided in the documentation.
I'm using the following request:
POST https://graph.microsoft.com/beta/sites/{siteId}/pages
{
"name":"Events.aspx",
"title":"Team Events",
"publishingState": {
"level":"checkedOut",
"versionId":"0.1"
},
"webParts":[
{
"type":"rte",
"innerHTML":"<p>Here are the teams upcoming events:</p>"
}
]
}
and its returning this response
{
"error": {
"code": "generalException",
"message": "General exception while processing",
"innerError": {
"date": "2020-11-18T05:11:16",
"request-id": "09efb46d-f393-46c8-a8ff-450815c85d35",
"client-request-id": "0ef11da8-832e-47d8-ed5d-1192343af8fa"
}
}
}
I had exactly the same problem, and stumbled across this StackOverflow post.
Creating pages on sharepoint site with microsoft graph
Basically, there is an issue with the docs. The innerHTML key needs to be wrapped inside a data key.
So you would be calling the following:
{
"name":"Events.aspx",
"title":"Team Events",
"publishingState": {
"level":"checkedOut",
"versionId":"0.1"
},
"webParts":[
{
"type":"rte",
"data": {
"innerHTML":"<p>Here are the teams upcoming events:</p>"
}
}
]
}
If you are making your request exactly as shown in the question, the issue may be the URL. The {siteId} part of your POST URL is a placeholder.
You will want to replace {siteId} with your site ID
For example, if your siteID is ABC123, then the URL for your POST would be:
https://graph.microsoft.com/beta/sites/ABC123/pages
I am trying to create a new folder under the root of my onedrive by making a call to the following end point :
Request:
POST graph.microsoft.com/v1.0/me/drive/items/rootId/children
Content-Type: application/json
{
"name": "New Folder",
"folder": { },
"#microsoft.graph.conflictBehavior": "rename"
}
Expected Response:
HTTP/1.1 201 Created
Content-Type: application/json
{
"createdBy": {
"user": {
...
Obtained Response:
200 OK
When I make a call to this endpoint using Postman, I get a list of children under the root folder and the folder is not created.
Is the any way to resolve this?
Is there anything that i am doing wrong?
Kindly let me know.
use HTTPS request for all Microsoft Graph APIs
POST https://graph.microsoft.com/v1.0/me/drive/items/<rootId>/children
Can you provide a link to the docs page with that endpoint?
You can try make request to drive/root/children
below is a c# code for that:
var folder = new DriveItem { Name = "New Folder", Folder = new Folder() };
await client.Drive.Root.Children.Request().AddAsync(folder);
I used it a bit differently for something else, but should work analogically for you.
As other workaround, you can try to get the id of your drive id and drive root item id and then try to use the the endpoint without "me/" and "drives/{driveId}/items/{rootItemId}" instead.
PS. Have you inspected your oneDrive to obesrve the results of your calls? What do they produce?
I am trying to create new document at firestore, using bearer token, retrieved from from Auth SDK (ios, but actually I am using FirebaseAuth for osx, that's why I have no other choose except using REST, because there is no FirebaseFirestore support for osx).
The rules are
service cloud.firestore {
match /databases/{database}/documents {
match /places {
allow create, update, delete, read: if true;
}
}
}
For retrieving token
Auth.auth().currentUser?.getIDTokenForcingRefresh(true, completion ..
After I get token as a string and put it to header Authorization: Bearer MY_RETRIEVED_TOKEN
Link I requesting
https://firestore.googleapis.com/v1beta1/projects/MYPROJECTID/databases/(default)/documents/places?fields=fields&documentId=kk&key=API_KEY_FOR_WEB_APP_FROM_FIREBASE_PROJECT_SETTING
So here I am passing key from Firebase project settings for Web
Body of this POST request
{
"fields": {
"nn": {
"stringValue": "hhh"
}
}
}
But it the end I get 403 in response.
{
"error": {
"code": 403,
"message": "Missing or insufficient permissions.",
"status": "PERMISSION_DENIED"
}
}
Already broken up my mind trying to find an error. Thanks in advance!
I had the same problem few days ago.
You should try to modify your rules like code bellow:
service cloud.firestore {
match /databases/{database}/documents {
match /places/{document=**} {
allow create, update, delete, read: if true;
}
}
}
In this case you set rules for all document's of places.
Also you can test your rules in Rules Simulator. This works quite good.
I hope this will help you
A Post entity (https://msdn.microsoft.com/en-us/library/mt607553.aspx) cannot be created using Dynamics CRM 2016 Online Web API.
This payload should create a post on POST /api/data/v8.1/posts
{
"text": "Test Single Post",
"source": 1,
"type": 7
}
(source 1 is an auto post, type 7 is a status post)
But it returns:
{
"error":
{
"code":"",
"message":"An unexpected error occurred.",
"innererror"
{
"message":"An unexpected error occurred..."
}
}
}
Submitting the same payload with only "text" fails too.
Notice that the Post entity does not have single-valued navigation properties (https://msdn.microsoft.com/en-us/library/mt607553.aspx#bkmk_SingleValuedNavigationProperties) that will allow me to set the related entity (contact, account, etc).
For example, Creating a Task entity (https://msdn.microsoft.com/en-us/library/mt607619.aspx) works fine on POST /api/data/v8.1/tasks
{
"subject": "Test Single Task",
"description": "Test One Description of Task",
"regardingobjectid_contact_task#odata.bind": "/contacts(<someguid>)",
"scheduledend": "2016-07-21T12:11:19.4875892Z"
}
It seems to me that Post should expose something like regardingobjectid_contact_post#odata.bind, but it does not.
For context, this is how to create a Post via the SOAP endpoint and the SDK:
var result = Client.getOrganizationService().Create(new Post
{
Text = post.text,
RegardingObjectId = new EntityReference(
entityName,
Guid.Parse(post.regarding_guid)
)
});
Does anyone have a working example of a Post created via the Web API? Is this an omission in the Dynamics CRM Web API?
It doesn't look like this is listed in the limitations: https://msdn.microsoft.com/en-us/library/mt628816.aspx
UPDATE
It appears that the postregarding entity is where the link should be created to contact/account. This can be demonstrated by querying:
/posts?$filter=postregardingid/regardingobjectid_contact/contactid eq <someguid>
However, a "deep insert" like so does not work:
{
"text":"sometext",
"postregardingid":
{
"regardingobjectid_contact#odata.bind":"/contacts(someguid)"
}
}
The response is
Cannot create child entities before parent entity.
Nowhere it's mentioned like Post (activity feed) cannot be created using webapi. In fact it's not listed as crm webapi limitation like you pointed out.
Also on comparison, _regardingobjectid_value lookup property of post is different from activitypointer. Single valued navigation property too.
Out of curiosity, My investigation moved towards the Partner - post_PostRegardings
Only thing making sense - postregarding is strictly internal use. This could be the reason for all such behavior. This is my theory per v8.2 today(Aug 12 2017)
Description: Represents which object an activity feed post is regarding. For internal use only.
Entity Set path:[organization URI]/api/data/v8.2/postregardings
Base Type: crmbaseentity EntityType
Display Name: Post Regarding
Primary Key: postregardingid
Ref: https://msdn.microsoft.com/en-us/library/mt608103.aspx
Update:
Looks like MS recommend the community to use Organization service to create a custom Post record. Web api is still broken. Read more
I was recently struggling with this issue with an Activity table made using powerapps. For those who are interested, here's my post request:
POST: https://<MY_DOMAIN>.crm.dynamics.com/api/data/v9.1/<TABLE_NAME>
{
"regardingobjectid_contact#odata.bind": "/contacts(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)",
"description": "data for this entity",
"subject": "more data"
}
I didn't do anything different from other peoples' answers. I'll give an update if this problem fails sporadically. But as it is right now, it looks like regardingobjectid may be working in version 9.1
using D365 Api v9.1
POST https://{domain}.crm4.dynamics.com/api/data/v9.1/posts
{
"regardingobjectid_contact#odata.bind":"/contacts(guid)",
"text": "This is a private message post",
"source": 1,
"type": 4
}
source :
Auto Post
Manual Post
ActionHub Post
type :
Check-in
Idea
News
Private Message
Question
Re-Post
Status
With certain facebook posts, that are seemingly completely public (for example) I am unable to pull their information from the graph API no matter what combination of permissions / application / access_token I give it.
Even worse, I just get a generic error:
https://developers.facebook.com/tools/explorer?method=GET&path=10153801897821136&version=v2.5
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"fbtrace_id": "GU3r05xB4VK"
}
}
It seems that for whatever reason facebook has decided that I shouldn't be able to view this post (likely because of privacy settings) but I can very obviously view the actual post on facebook, even as a logged out user.
Any thoughts as to how to get this to work via the API?
Within Facebook API, a public post that can be retrieved, refers to a post published by a Facebook page not a Facebook user profile.
In order to view this post, you will need user_posts and user_friends for the owner of that video and the querying user.
So for querying userA to get a public video from userB (who is a friend of userA), the permissions for both are
{
"data": [
{
"permission": "user_friends",
"status": "granted"
},
{
"permission": "user_posts",
"status": "granted"
},
{
"permission": "public_profile",
"status": "granted"
}
]
}