Skip to content

Instantly share code, notes, and snippets.

@shemogumbe
Created April 19, 2024 14:01
Show Gist options
  • Save shemogumbe/90feb0a337d7ae87fcdd69274b21169b to your computer and use it in GitHub Desktop.
Save shemogumbe/90feb0a337d7ae87fcdd69274b21169b to your computer and use it in GitHub Desktop.
Ability to delete group photo
'/groups/{group-id}/photo/$value':
get:
tags:
- groups.profilePhoto
summary: Get media content for the navigation property photo from groups
operationId: group_GetPhotoContent
parameters:
- name: group-id
in: path
description: The unique identifier of group
required: true
style: simple
schema:
type: string
x-ms-docs-key-type: group
responses:
2XX:
description: Retrieved media content
content:
application/octet-stream:
schema:
type: string
format: binary
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
put:
tags:
- groups.profilePhoto
summary: Update media content for the navigation property photo in groups
operationId: group_SetPhotoContent
parameters:
- name: group-id
in: path
description: The unique identifier of group
required: true
style: simple
schema:
type: string
x-ms-docs-key-type: group
requestBody:
description: New media content.
content:
application/octet-stream:
schema:
type: string
format: binary
required: true
responses:
2XX:
description: Success
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
'/groups/{group-id}/photos':
get:
tags:
- groups.profilePhoto
summary: List photos
description: Retrieve a list of profilePhoto objects.
externalDocs:
description: Find more info here
url: https://learn.microsoft.com/graph/api/group-list-photos?view=graph-rest-1.0
operationId: group_ListPhoto
parameters:
- name: group-id
in: path
description: The unique identifier of group
required: true
style: simple
schema:
type: string
x-ms-docs-key-type: group
- $ref: '#/components/parameters/top'
- $ref: '#/components/parameters/skip'
- $ref: '#/components/parameters/filter'
- name: $orderby
in: query
description: Order items by property values
style: form
explode: false
schema:
uniqueItems: true
type: array
items:
type: string
- name: $select
in: query
description: Select properties to be returned
style: form
explode: false
schema:
uniqueItems: true
type: array
items:
type: string
responses:
2XX:
$ref: '#/components/responses/microsoft.graph.profilePhotoCollectionResponse'
default:
$ref: '#/components/responses/error'
x-ms-pageable:
nextLinkName: '@odata.nextLink'
operationName: listMore
x-ms-docs-operation-type: operation
'/groups/{group-id}/photos/{profilePhoto-id}':
get:
tags:
- groups.profilePhoto
summary: Get photos from groups
description: The profile photos owned by the group. Read-only. Nullable.
operationId: group_GetPhoto
parameters:
- name: group-id
in: path
description: The unique identifier of group
required: true
style: simple
schema:
type: string
x-ms-docs-key-type: group
- name: profilePhoto-id
in: path
description: The unique identifier of profilePhoto
required: true
style: simple
schema:
type: string
x-ms-docs-key-type: profilePhoto
- name: $select
in: query
description: Select properties to be returned
style: form
explode: false
schema:
uniqueItems: true
type: array
items:
type: string
responses:
2XX:
description: Retrieved navigation property
content:
application/json:
schema:
$ref: '#/components/schemas/microsoft.graph.profilePhoto'
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
'/groups/{group-id}/photos/{profilePhoto-id}/$value':
get:
tags:
- groups.profilePhoto
summary: Get media content for the navigation property photos from groups
externalDocs:
description: Find more info here
url: https://learn.microsoft.com/graph/api/group-list-photos?view=graph-rest-1.0
operationId: group_GetPhotosContent
parameters:
- name: group-id
in: path
description: The unique identifier of group
required: true
style: simple
schema:
type: string
x-ms-docs-key-type: group
- name: profilePhoto-id
in: path
description: The unique identifier of profilePhoto
required: true
style: simple
schema:
type: string
x-ms-docs-key-type: profilePhoto
responses:
2XX:
description: Retrieved media content
content:
application/octet-stream:
schema:
type: string
format: binary
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
put:
tags:
- groups.profilePhoto
summary: Update media content for the navigation property photos in groups
operationId: group_SetPhotosContent
parameters:
- name: group-id
in: path
description: The unique identifier of group
required: true
style: simple
schema:
type: string
x-ms-docs-key-type: group
- name: profilePhoto-id
in: path
description: The unique identifier of profilePhoto
required: true
style: simple
schema:
type: string
x-ms-docs-key-type: profilePhoto
requestBody:
description: New media content.
content:
application/octet-stream:
schema:
type: string
format: binary
required: true
responses:
2XX:
description: Success
default:
$ref: '#/components/responses/error'
x-ms-docs-operation-type: operation
@shemogumbe
Copy link
Author

The path /groups/{group-id}/photo/$value and other paths that could be used as workarounds do not have delete functionality, they have just get and put

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment