Skip to content

Multiple identical email address returned by event.attendees #622

Open
@ruuttt

Description

@ruuttt

Thanks you for creating the library. I think I found a bug. Below you can find the steps to reproduce the bug.

When I would create an event using your example code and now would invite two instead of one attendee:

from datetime import datetime, timedelta

from examples import acquire_token_by_username_password
from office365.graph_client import GraphClient
from office365.outlook.calendar.event import Event

client = GraphClient(acquire_token_by_username_password)
new_event = client.me.calendar.events.add()  # type: Event
new_event.subject = "Let's go for lunch"
new_event.body = "Does mid month work for you?"
new_event.start = datetime.utcnow() + timedelta(days=1)
new_event.end = datetime.utcnow() + timedelta(days=1) + timedelta(hours=1)
new_event.attendees = ["[email protected]", "[email protected]"]
client.execute_query()
print("Event created")

and store the calendar_identifier in a database

events = client.me.calendar.events.get().top(1).select(["subject", "body"]).execute_query()
calendar_identifier = events[0].id
#store calendar_identifier in the database

and when I later on would extract the event like this

#retrieve calendar_identifier from the database
currentEvent=client.me.calendar.events[calendar_identifier ].get().execute_query()

and loop over the attendees, like this

for item in currentEvent.attendees:
    print(item.emailAddress.address)

they all have the same email address, output:

While I would expect this output:

Versions used:

  • Office365-REST-Python-Client 2.3.16
  • Python 3.9

I would really appreciate it if you would be able to solve this bug in your next release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions