EWS Calendar Attendees - exchange-server

I am working with the Exchange Web Service and am able to retrieve calendar events using the FindItem function. I have the function returning the IDOnly and making an additional call to GetItem to get all the properties. I am able to get everything I need with the exception of Attendees who are outside of the firm.
For example, if my company has john#abc.com and joe#abc.com email accounts and I have a calendar item with both, the EWS API is correctly returning both those are attendees.
However, if I create an event with john#abc.com and johnsmithxxxxx#gmail.com, the gmail address does not get returned in the API response even though it shows up within Outlook. Is this by design or do I need to specify some additional parameter to have the EWS API return ALL attendees regardless if they have a mailbox on the exchange server or not?

Related

Outlook Graph API not receiving groups

What I am trying to achieve -
When I call message API, it returns the group address to which mail is sent, I want to get the members of the group, And for that I believe I need group Id, so I am using the groups API mentioned below https://graph.microsoft.com/v1.0/groups
But this API returns an empty list to me.
Note: email I using is #outlook.com, not xyz.com.
The Microsoft graph API doesn't support personal accounts as you can see the below image. You should have a Work account to get the group details. You were able to get the messages because it supports personal accounts to read messages from your mailbox.

Edit Google Calendar "From" and "Organizer"

I want to create event via google calendar api using Go. I found out that the sender (From) is whoever responsible in client_id I provide in the google API, in this case me. Can I edit this sender, so that it is not sent from me? At least I can edit the display name of the sender, the email I think will always be my email
Also about editing the organizer, I tried to use move action but it only moves the event, not change the organizer. Is there other way to edit organizer?
To address your questions:
1. Can I create an event from another address?
What you want can be done by creating a service account and performing domain-wide-delegation
What is a service account?
A service account is a special type of Google account intended to represent a non-human user that needs to authenticate and be authorized to access data in Google APIs - in your situation the Calendar API.
After creating the above mentioned service account, you will have to perform domain-wide-delegation and impersonate a user in your domain in order to be able to create the event wanted.
Now, when writing the code for your application, you will have the use the credentials that were created for this account in order to authorize the requests.
OR
If you want to specifically edit only the display name of the creator of the event, you can perform an update request:
PUT https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId
And add in the request body this:
"creator": {
"displayName": "UPDATED DISPLAY NAME"
}
2. Can I edit the organizer?
According to the Calendar API Documentation:
organizer > The organizer of the event. If the organizer is also an attendee, this is indicated with a separate entry in attendees with the organizer field set to True. To change the organizer, use the move operation. Read-only, except when importing an event.
Therefore, the organizer can be changed/updated only when importing the event in question.
Reference
Authorizing Requests to the Google Calendar API
;
Creating A Service Account;
Calendar API Events Resource;
Calendar API Events:Update.

Get sip address, or username from identity in Teams Calling API

We have a calling enabled teams bot, that receives calls. From the data it receives, we want to retrieve who is actually calling. For PSTN calls, this is ok. However, for Teams-to-Teams-calls (or SfB-Teams calls) we get the calling identity as (underneath example is SfB->Teams):
"identity":{
"#odata.type":"#microsoft.graph.identitySet",
"onPremises":{
"#odata.type":"#microsoft.graph.identity",
"id":"<guid>",
"tenantId":"<guid>",
"identityProvider":"None"
}
When all participants live in the tenant of the calling bot, we can retrieve all info (by using the graph API and just query the user with that objectID). But in the case the caller is from another tenant, how can we retrieve the displayname/sipadres for the identity?
For example, if I am being called, my teams client shows a display name. Now if the bot is called, how can it know the displayname (or sip address)?
I've tried to read out more properties using https://graph.microsoft.com/beta/communications/calls/..., however, that returns a 'call not found' consistently.
Specifically we don't support calls from sfb with details of caller. From Teams client should be able to get caller object ID though

Exchange EWS ErrorCalendarIsNotOrganizer despite being the organizer

I'm trying to cancel a meeting I created by using an EWS XML CreateItem request (against a 2013 server):
<ns2:CreateItem MessageDisposition="SendAndSaveCopy"><ns2:Items>
<ns1:CancelCalendarItem>
<ns1:ReferenceItemId Id="AAMkA...." ChangeKey="DwAAA..."/>
</ns1:CancelCalendarItem>
</ns2:Items></ns2:CreateItem>
So far so good, however Outlook denies me access with the ResponseCode "ErrorCalendarIsNotOrganizer" / "User must be an organizer for CancelCalendarItem action".
A look in the event detail by using GetItem with BaseShape=ALL_PROPERTIES reveals that the account I use is set as Organizer, however at the same time:
the IsOrganizer field is set to false
in EffectiveRights the fields Read, Modify and Delete are true.
I can delete the appointment lateron using a DeleteItem request and it works, however it only removes the appointment from the room's calendar but not from the mailboxes of the attendees.
What causes this? There is no impersonation in use, only the service account I use has delegation access to every room mailbox (to be able to see all appointments).
I can delete the appointment lateron using a DeleteItem request and it works, however it only removes the appointment from the room's calendar but not from the mailboxes of the attendees.
It sounds like your accessing the appointment in the Room Mailboxes calendar ? this is why even if your using the account that is the organizer of that appointment the isOrganizer will return as false because this property is only true on the copy of the Appointment in the Organizers calendar. To correctly cancel the meeting you need to do that on the calendar of the Organizer (not the rooms or any attendee instance of the meeting). This will still only delete the appointment in the organizer calendar and send cancellation messages to the attendees.
An important point is that all instances of the meeting stored in the Attendees and Meeting Room calendars are separate Exchange Store items with no direct link. So deleting the organizer instance (or any attendee instance) has no affect on the other attendees instances these must be processed separately by the attendees themselves based on the cancellation message that is received.

Accepting calendar invites via Google API

How do I accept a calendar invite using something like the Google Calendar API or the Google Gmail API?
Bonus points if you can point me how to do it in Ruby, but just a hint at which API I should be using would be more than fine.
You should be using events patch.
First create an Event with just the information you want to change. In this case, this will be the single attendee (even if there are multiple attendees) whose response you want to modify (which should be the same as the user under which the call is made), and the corresponding response status ("accepted", "declined", "tentative").
Then you execute patch, passing in the event id and the sparse event created above.
An example in Java is at https://stackoverflow.com/a/41054893/80075

Resources