openapi: 3.1.0 info: title: Microsoft Graph Oauth2permissiongrants description: Needs a description. paths: /me/oauth2PermissionGrants: description: >- Provides operations to manage the oauth2PermissionGrants property of the microsoft.graph.user entity. get: tags: - me.oAuth2PermissionGrant summary: Microsoft Graph Get oauth2PermissionGrants from me operationId: me.ListOauth2PermissionGrants parameters: - $ref: '#/components/parameters/top' - $ref: '#/components/parameters/skip' - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' - $ref: '#/components/parameters/count' - 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 - name: $expand in: query description: Expand related entities style: form explode: false schema: uniqueItems: true type: array items: type: string responses: 2XX: $ref: >- #/components/responses/microsoft.graph.oAuth2PermissionGrantCollectionResponse 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' x-ms-pageable: nextLinkName: '@odata.nextLink' operationName: listMore x-ms-docs-operation-type: operation /me/oauth2PermissionGrants/{oAuth2PermissionGrant-id}: description: >- Provides operations to manage the oauth2PermissionGrants property of the microsoft.graph.user entity. get: tags: - me.oAuth2PermissionGrant summary: Microsoft Graph Get oauth2PermissionGrants from me operationId: me.GetOauth2PermissionGrants parameters: - name: $select in: query description: Select properties to be returned style: form explode: false schema: uniqueItems: true type: array items: type: string - name: $expand in: query description: Expand related entities 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.oAuth2PermissionGrant' 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation parameters: - name: oAuth2PermissionGrant-id in: path description: The unique identifier of oAuth2PermissionGrant required: true schema: type: string x-ms-docs-key-type: oAuth2PermissionGrant /me/oauth2PermissionGrants/$count: description: Provides operations to count the resources in the collection. get: tags: - me.oAuth2PermissionGrant summary: Microsoft Graph Get the number of the resource operationId: me.oauth2PermissionGrants.GetCount-2e61 parameters: - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: 2XX: $ref: '#/components/responses/ODataCountResponse' 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' /oauth2PermissionGrants: description: >- Provides operations to manage the collection of oAuth2PermissionGrant entities. get: tags: - oauth2PermissionGrants.oAuth2PermissionGrant summary: Microsoft Graph List oauth2PermissionGrants (delegated permission grants) description: >- Retrieve a list of oAuth2PermissionGrant objects, representing delegated permissions which have been granted for client applications to access APIs on behalf of signed-in users. externalDocs: description: Find more info here url: >- https://learn.microsoft.com/graph/api/oauth2permissiongrant-list?view=graph-rest-1.0 operationId: oauth2PermissionGrants.oAuth2PermissionGrant.ListOAuth2PermissionGrant parameters: - $ref: '#/components/parameters/top' - $ref: '#/components/parameters/skip' - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' - $ref: '#/components/parameters/count' - 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 - name: $expand in: query description: Expand related entities style: form explode: false schema: uniqueItems: true type: array items: type: string responses: 2XX: $ref: >- #/components/responses/microsoft.graph.oAuth2PermissionGrantCollectionResponse 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' x-ms-pageable: nextLinkName: '@odata.nextLink' operationName: listMore x-ms-docs-operation-type: operation post: tags: - oauth2PermissionGrants.oAuth2PermissionGrant summary: Microsoft Graph Create oAuth2PermissionGrant (a delegated permission grant) description: >- Create a delegated permission grant represented by an oAuth2PermissionGrant object. A delegated permission grant authorizes a client service principal (representing a client application) to access a resource service principal (representing an API), on behalf of a signed-in user, for the level of access limited by the delegated permissions which were granted. externalDocs: description: Find more info here url: >- https://learn.microsoft.com/graph/api/oauth2permissiongrant-post?view=graph-rest-1.0 operationId: oauth2PermissionGrants.oAuth2PermissionGrant.CreateOAuth2PermissionGrant requestBody: description: New entity content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.oAuth2PermissionGrant' required: true responses: 2XX: description: Created entity content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.oAuth2PermissionGrant' 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation /oauth2PermissionGrants/{oAuth2PermissionGrant-id}: description: >- Provides operations to manage the collection of oAuth2PermissionGrant entities. get: tags: - oauth2PermissionGrants.oAuth2PermissionGrant summary: Microsoft Graph Get oAuth2PermissionGrant (a delegated permission grant) description: >- Retrieve the properties of a single delegated permission grant represented by an oAuth2PermissionGrant object. An oAuth2PermissionGrant represents delegated permissions which have been granted for a client application to access an API on behalf of a signed-in user. externalDocs: description: Find more info here url: >- https://learn.microsoft.com/graph/api/oauth2permissiongrant-get?view=graph-rest-1.0 operationId: oauth2PermissionGrants.oAuth2PermissionGrant.GetOAuth2PermissionGrant parameters: - name: $select in: query description: Select properties to be returned style: form explode: false schema: uniqueItems: true type: array items: type: string - name: $expand in: query description: Expand related entities style: form explode: false schema: uniqueItems: true type: array items: type: string responses: 2XX: description: Retrieved entity content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.oAuth2PermissionGrant' 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation patch: tags: - oauth2PermissionGrants.oAuth2PermissionGrant summary: Microsoft Graph Update a delegated permission grant (oAuth2PermissionGrant) description: >- Update the properties of oAuth2PermissionGrant object, representing a delegated permission grant. An oAuth2PermissionGrant can be updated to change which delegated permissions are granted, by adding or removing items from the list in scopes. externalDocs: description: Find more info here url: >- https://learn.microsoft.com/graph/api/oauth2permissiongrant-update?view=graph-rest-1.0 operationId: oauth2PermissionGrants.oAuth2PermissionGrant.UpdateOAuth2PermissionGrant requestBody: description: New property values content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.oAuth2PermissionGrant' required: true responses: 2XX: description: Success content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.oAuth2PermissionGrant' 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation delete: tags: - oauth2PermissionGrants.oAuth2PermissionGrant summary: Microsoft Graph Delete oAuth2PermissionGrant (a delegated permission grant) description: >- Delete a delegated permission grant, represented by an oAuth2PermissionGrant object. When a delegated permission grant is deleted, the access it granted is revoked. Existing access tokens will continue to be valid for their lifetime, but new access tokens will not be granted for the delegated permissions identified in the deleted oAuth2PermissionGrant. externalDocs: description: Find more info here url: >- https://learn.microsoft.com/graph/api/oauth2permissiongrant-delete?view=graph-rest-1.0 operationId: oauth2PermissionGrants.oAuth2PermissionGrant.DeleteOAuth2PermissionGrant parameters: - name: If-Match in: header description: ETag schema: type: string responses: '204': description: Success 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation parameters: - name: oAuth2PermissionGrant-id in: path description: The unique identifier of oAuth2PermissionGrant required: true schema: type: string x-ms-docs-key-type: oAuth2PermissionGrant /oauth2PermissionGrants/$count: description: Provides operations to count the resources in the collection. get: tags: - oauth2PermissionGrants.oAuth2PermissionGrant summary: Microsoft Graph Get the number of the resource operationId: oauth2PermissionGrants.GetCount-8287 parameters: - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: 2XX: $ref: '#/components/responses/ODataCountResponse' 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' /oauth2PermissionGrants/delta(): description: Provides operations to call the delta method. get: tags: - oauth2PermissionGrants.oAuth2PermissionGrant.Functions summary: Microsoft Graph Invoke function delta description: >- Get newly created, updated, or deleted oauth2permissiongrant objects without performing a full read of the entire resource collection. For more information, see Use delta query to track changes in Microsoft Graph data for details. externalDocs: description: Find more info here url: >- https://learn.microsoft.com/graph/api/oauth2permissiongrant-delta?view=graph-rest-1.0 operationId: oauth2PermissionGrants.delta parameters: - $ref: '#/components/parameters/top' - $ref: '#/components/parameters/skip' - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' - $ref: '#/components/parameters/count' - name: $select in: query description: Select properties to be returned style: form explode: false schema: uniqueItems: true type: array items: type: string - name: $orderby in: query description: Order items by property values style: form explode: false schema: uniqueItems: true type: array items: type: string - name: $expand in: query description: Expand related entities style: form explode: false schema: uniqueItems: true type: array items: type: string responses: 2XX: description: Success content: application/json: schema: title: Collection of oAuth2PermissionGrant type: object allOf: - $ref: '#/components/schemas/BaseDeltaFunctionResponse' - type: object properties: value: type: array items: $ref: >- #/components/schemas/microsoft.graph.oAuth2PermissionGrant 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' x-ms-docs-operation-type: function x-ms-pageable: nextLinkName: '@odata.nextLink' operationName: listMore /servicePrincipals/{servicePrincipal-id}/oauth2PermissionGrants: description: >- Provides operations to manage the oauth2PermissionGrants property of the microsoft.graph.servicePrincipal entity. get: tags: - servicePrincipals.oAuth2PermissionGrant summary: Microsoft Graph List oauth2PermissionGrants granted to a service principal description: >- Retrieve a list of oAuth2PermissionGrant entities, representing delegated permissions granted to the service principal (representing the client application) to access an API on behalf of a user. externalDocs: description: Find more info here url: >- https://learn.microsoft.com/graph/api/serviceprincipal-list-oauth2permissiongrants?view=graph-rest-1.0 operationId: servicePrincipals.ListOauth2PermissionGrants parameters: - $ref: '#/components/parameters/top' - $ref: '#/components/parameters/skip' - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' - $ref: '#/components/parameters/count' - 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 - name: $expand in: query description: Expand related entities style: form explode: false schema: uniqueItems: true type: array items: type: string responses: 2XX: $ref: >- #/components/responses/microsoft.graph.oAuth2PermissionGrantCollectionResponse 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' x-ms-pageable: nextLinkName: '@odata.nextLink' operationName: listMore x-ms-docs-operation-type: operation parameters: - name: servicePrincipal-id in: path description: The unique identifier of servicePrincipal required: true schema: type: string x-ms-docs-key-type: servicePrincipal /servicePrincipals/{servicePrincipal-id}/oauth2PermissionGrants/{oAuth2PermissionGrant-id}: description: >- Provides operations to manage the oauth2PermissionGrants property of the microsoft.graph.servicePrincipal entity. get: tags: - servicePrincipals.oAuth2PermissionGrant summary: Microsoft Graph Get oauth2PermissionGrants from servicePrincipals description: >- Delegated permission grants authorizing this service principal to access an API on behalf of a signed-in user. Read-only. Nullable. operationId: servicePrincipals.GetOauth2PermissionGrants parameters: - name: $select in: query description: Select properties to be returned style: form explode: false schema: uniqueItems: true type: array items: type: string - name: $expand in: query description: Expand related entities 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.oAuth2PermissionGrant' 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation parameters: - name: servicePrincipal-id in: path description: The unique identifier of servicePrincipal required: true schema: type: string x-ms-docs-key-type: servicePrincipal - name: oAuth2PermissionGrant-id in: path description: The unique identifier of oAuth2PermissionGrant required: true schema: type: string x-ms-docs-key-type: oAuth2PermissionGrant /servicePrincipals/{servicePrincipal-id}/oauth2PermissionGrants/$count: description: Provides operations to count the resources in the collection. get: tags: - servicePrincipals.oAuth2PermissionGrant summary: Microsoft Graph Get the number of the resource operationId: servicePrincipals.oauth2PermissionGrants.GetCount-f9dc parameters: - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: 2XX: $ref: '#/components/responses/ODataCountResponse' 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' parameters: - name: servicePrincipal-id in: path description: The unique identifier of servicePrincipal required: true schema: type: string x-ms-docs-key-type: servicePrincipal /users/{user-id}/oauth2PermissionGrants: description: >- Provides operations to manage the oauth2PermissionGrants property of the microsoft.graph.user entity. get: tags: - users.oAuth2PermissionGrant summary: Microsoft Graph List a user's oauth2PermissionGrants description: >- Retrieve a list of oAuth2PermissionGrant entities, which represent delegated permissions granted to enable a client application to access an API on behalf of the user. externalDocs: description: Find more info here url: >- https://learn.microsoft.com/graph/api/user-list-oauth2permissiongrants?view=graph-rest-1.0 operationId: users.ListOauth2PermissionGrants parameters: - $ref: '#/components/parameters/top' - $ref: '#/components/parameters/skip' - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' - $ref: '#/components/parameters/count' - 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 - name: $expand in: query description: Expand related entities style: form explode: false schema: uniqueItems: true type: array items: type: string responses: 2XX: $ref: >- #/components/responses/microsoft.graph.oAuth2PermissionGrantCollectionResponse 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' x-ms-pageable: nextLinkName: '@odata.nextLink' operationName: listMore x-ms-docs-operation-type: operation parameters: - name: user-id in: path description: The unique identifier of user required: true schema: type: string x-ms-docs-key-type: user /users/{user-id}/oauth2PermissionGrants/{oAuth2PermissionGrant-id}: description: >- Provides operations to manage the oauth2PermissionGrants property of the microsoft.graph.user entity. get: tags: - users.oAuth2PermissionGrant summary: Microsoft Graph Get oauth2PermissionGrants from users operationId: users.GetOauth2PermissionGrants parameters: - name: $select in: query description: Select properties to be returned style: form explode: false schema: uniqueItems: true type: array items: type: string - name: $expand in: query description: Expand related entities 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.oAuth2PermissionGrant' 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' x-ms-docs-operation-type: operation parameters: - name: user-id in: path description: The unique identifier of user required: true schema: type: string x-ms-docs-key-type: user - name: oAuth2PermissionGrant-id in: path description: The unique identifier of oAuth2PermissionGrant required: true schema: type: string x-ms-docs-key-type: oAuth2PermissionGrant /users/{user-id}/oauth2PermissionGrants/$count: description: Provides operations to count the resources in the collection. get: tags: - users.oAuth2PermissionGrant summary: Microsoft Graph Get the number of the resource operationId: users.oauth2PermissionGrants.GetCount-fb7b parameters: - $ref: '#/components/parameters/search' - $ref: '#/components/parameters/filter' responses: 2XX: $ref: '#/components/responses/ODataCountResponse' 4XX: $ref: '#/components/responses/error' 5XX: $ref: '#/components/responses/error' parameters: - name: user-id in: path description: The unique identifier of user required: true schema: type: string x-ms-docs-key-type: user components: schemas: microsoft.graph.oAuth2PermissionGrant: allOf: - $ref: '#/components/schemas/microsoft.graph.entity' - title: oAuth2PermissionGrant required: - '@odata.type' type: object properties: clientId: type: string description: >- The object id (not appId) of the client service principal for the application that's authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only). consentType: type: string description: >- Indicates if authorization is granted for the client application to impersonate all users or only a specific user. AllPrincipals indicates authorization to impersonate all users. Principal indicates authorization to impersonate a specific user. Consent on behalf of all users can be granted by an administrator. Nonadmin users might be authorized to consent on behalf of themselves in some cases, for some delegated permissions. Required. Supports $filter (eq only). nullable: true principalId: type: string description: >- The id of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal. If consentType is AllPrincipals this value is null. Required when consentType is Principal. Supports $filter (eq only). nullable: true resourceId: type: string description: >- The id of the resource service principal to which access is authorized. This identifies the API that the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only). scope: type: string description: >- A space-separated list of the claim values for delegated permissions that should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the oauth2PermissionScopes property of the resource service principal. Must not exceed 3,850 characters in length. nullable: true '@odata.type': type: string x-ms-discriminator-value: '#microsoft.graph.oAuth2PermissionGrant' BaseDeltaFunctionResponse: title: Base delta function response type: object properties: '@odata.nextLink': type: string nullable: true '@odata.deltaLink': type: string nullable: true parameters: top: name: $top in: query description: Show only the first n items style: form explode: false schema: minimum: 0 type: integer example: 50 skip: name: $skip in: query description: Skip the first n items style: form explode: false schema: minimum: 0 type: integer search: name: $search in: query description: Search items by search phrases style: form explode: false schema: type: string filter: name: $filter in: query description: Filter items by property values style: form explode: false schema: type: string count: name: $count in: query description: Include count of items style: form explode: false schema: type: boolean examples: {} responses: error: description: error content: application/json: schema: $ref: '#/components/schemas/microsoft.graph.ODataErrors.ODataError' ODataCountResponse: description: The count of the resource content: text/plain: schema: $ref: '#/components/schemas/ODataCountResponse' tags: - name: me.oAuth2PermissionGrant - name: oauth2PermissionGrants.oAuth2PermissionGrant - name: oauth2PermissionGrants.oAuth2PermissionGrant.Functions - name: servicePrincipals.oAuth2PermissionGrant - name: users.oAuth2PermissionGrant