Hello Kripa, It looks like you're encountering an issue with the UsersRequestBuilder
object in your Python code. The error message 'UsersRequestBuilder' object is not callable
suggests that there might be a problem with how the request is being constructed or executed.
To resolve this issue, you can use the correct method to fetch the online meeting details. Here's an updated version of your code:
from msgraph import GraphServiceClient
from msgraph.generated.users.item.online_meetings.online_meetings_request_builder import OnlineMeetingsRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
from azure.identity import ClientSecretCredential
tenant_id = "jkjjk"
client_id = "nmnm"
client_secret = "hkjj"
User_id = "jkkj"
SCOPES = ['https://graph.microsoft.com/.default']
credential = ClientSecretCredential(tenant_id=tenant_id, client_id=client_id, client_secret=client_secret)
graph_client = GraphServiceClient(credential, scopes=SCOPES)
# Define query parameters to filter meetings by the joinMeetingId
query_params = OnlineMeetingsRequestBuilder.OnlineMeetingsRequestBuilderGetQueryParameters(
filter="joinMeetingIdSettings/joinMeetingId eq '41234578912'"
)
# Configure the request with query parameters
request_configuration = RequestConfiguration(
query_parameters=query_params,
)
# Asynchronously fetch the online meeting details
async def get_meeting():
try:
# Correct method to fetch online meeting details
result = await graph_client.users[User_id].online_meetings.get(request_configuration=request_configuration)
# Process and display result (e.g., print details or extract specific fields)
print(result) # Modify as needed to handle `result` data
except Exception as e:
print("Error fetching meeting:", e)
# Run the async function
import asyncio
asyncio.run(get_meeting())