Required. Required. The full resource name to query from the list of grantable roles.
The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id my-project will be named //cloudresourcemanager.googleapis.com/projects/my-project.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-21 UTC."],[[["\u003cp\u003eThis webpage details how to query roles that can be granted on a Google Cloud resource via the \u003ccode\u003equeryGrantableRoles\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request to query grantable roles is a \u003ccode\u003ePOST\u003c/code\u003e request to \u003ccode\u003ehttps://iam.googleapis.com/v1/roles:queryGrantableRoles\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires a \u003ccode\u003efullResourceName\u003c/code\u003e field and allows optional \u003ccode\u003eview\u003c/code\u003e, \u003ccode\u003epageSize\u003c/code\u003e, and \u003ccode\u003epageToken\u003c/code\u003e fields for more specific and controlled results.\u003c/p\u003e\n"],["\u003cp\u003eThe response body returns a list of \u003ccode\u003eroles\u003c/code\u003e and an optional \u003ccode\u003enextPageToken\u003c/code\u003e for paginated results.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires either the \u003ccode\u003ehttps://www.googleapis.com/auth/iam\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scopes.\u003c/p\u003e\n"]]],[],null,["# Method: roles.queryGrantableRoles\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.QueryGrantableRolesResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Examples](#examples)\n- [Try it!](#try-it)\n\nLists roles that can be granted on a Google Cloud resource. A role is grantable if the IAM policy for the resource can contain bindings to the role.\n\n### HTTP request\n\n`POST https://iam.googleapis.com/v1/roles:queryGrantableRoles`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nThe grantable role query response.\n\nIf successful, the response body contains data with the following structure:\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/iam`\n- `\n https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]