I am using Developer account to generate Token, My URL looks like below:
And used the access token for getting the roles for the given group ID like below:
But it was throwing 405 Method not allowed
How can i retrieve the Admin Roles for the Given groupID?
You have a couple of things wrong here. First the default server is used to issue access tokens for your own API, not the Okta management API. To get a management API token, drop the “/default” and use the org authorization server. This has to be for an application requesting the access token, so make sure the application has okta.groups.read granted under “Okta API Scopes” and you request that scope for the token.
The second problem is your request URI is pointing at “oauth” and that isn’t the management API. To get the list of roles for a group try https://dev-33702273.okta.com/api/v1/groups/00ge0tuv0qAoWRb2p5d7/roles (I copied your domain name from above).
Look for the documentation on authorization servers and read about the org server here: Authorization servers | Okta Developer. Information on the roles request in the groups API isn’t in the documentation linked from the developer website, but it is here: Role Assignments.
Thanks @jmussman for the Detailed info. Let me check