Hi , I am using the /users api to get the domains and ids of my colleague now what is happening is that I do use the api- /me/events and try getting my events so in the response i am able to view other users events how can i customize it? please help .
I have the User.ReadBasic.All also.
openapi: 3.1.0
info:
title: Microsoft Graph API Integration
version: 1.0.0
servers:
components:
securitySchemes:
OAuth2:
type: oauth2
flows:
clientCredentials:
tokenUrl: https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token
scopes:
https://graph.microsoft.com/User.Read: Access current user profile
https://graph.microsoft.com/Mail.Read: Read user mail
https://graph.microsoft.com/Mail.Send: Send mail
https://graph.microsoft.com/Calendars.ReadWrite: Read and write user calendars
schemas:
UserProfile:
type: object
properties:
id:
type: string
displayName:
type: string
mail:
type: string
UserMessage:
type: object
properties:
id:
type: string
subject:
type: string
bodyPreview:
type: string
CalendarEvent:
type: object
properties:
id:
type: string
subject:
type: string
start:
type: object
properties:
dateTime:
type: string
timeZone:
type: string
end:
type: object
properties:
dateTime:
type: string
timeZone:
type: string
NewEvent:
type: object
properties:
subject:
type: string
start:
type: object
properties:
dateTime:
type: string
timeZone:
type: string
end:
type: object
properties:
dateTime:
type: string
timeZone:
type: string
attendees:
type: array
items:
type: object
properties:
emailAddress:
type: object
properties:
address:
type: string
name:
type: string
SendMailRequest:
type: object
properties:
message:
type: object
properties:
subject:
type: string
body:
type: object
properties:
contentType:
type: string
content:
type: string
toRecipients:
type: array
items:
type: object
properties:
emailAddress:
type: object
properties:
address:
type: string
security:
paths:
/me:
get:
operationId: getUserProfile
summary: Get the authenticated user's profile
security:
- OAuth2: []
responses:
'200':
description: A user profile
content:
application/json:
schema:
$ref: '#/components/schemas/UserProfile'
/me/messages:
get:
operationId: getUserMessages
summary: Get the authenticated user's messages
security:
- OAuth2: []
parameters:
- name: $top
in: query
required: false
schema:
type: integer
default: 10
description: Number of messages to return
- name: $filter
in: query
required: false
schema:
type: string
description: OData filter query to narrow results
- name: $orderby
in: query
required: false
schema:
type: string
description: OData order by query to sort results
responses:
'200':
description: A list of user messages
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/UserMessage'
/me/sendMail:
post:
operationId: sendUserMail
summary: Send an email as the authenticated user
security:
- OAuth2: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SendMailRequest'
responses:
'202':
description: Accepted
/me/events:
get:
operationId: getUserCalendarEvents
summary: Get the authenticated user's calendar events
security:
- OAuth2: []
responses:
'200':
description: A list of calendar events
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CalendarEvent'
post:
operationId: createUserCalendarEvent
summary: Create a new calendar event for the authenticated user
security:
- OAuth2: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/NewEvent'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/CalendarEvent'
/me/outlook/supportedTimeZones:
get:
operationId: getSupportedTimeZones
summary: Get supported time zones for the authenticated user
security:
- OAuth2: []
responses:
'200':
description: A list of supported time zones
content:
application/json:
schema:
type: array
items:
type: object
properties:
alias:
type: string
displayName:
type: string
/users:
get:
operationId: listUsers
summary: List users
security:
- OAuth2: []
parameters:
- name: $filter
in: query
required: true
schema:
type: string
description: OData filter query to narrow results
example: startsWith(displayName,'[NAME]')
responses:
'200':
description: A list of users
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/UserProfile'