Invalid scope error while access token generation


I have Jenkins pipeline which takes ProductName, scope as Paramaters to create product, maps scopes and deploy it to respective Apigee edge environments. After that, it creates okta scopes, Access policies and map these scopes with access policies by creating Okta rules.
Whenever the pipeline is executed, it creates Product and maps scopes in Apigee Edge and then success fully creates scopes, access policies and rules and mapping.

Now whenever I try to generate access token by calling OAuth proxy which goes to the OKTA auth server and get the token by making Postman call, It fails with the below error:

**"error": "invalid_scope",**
"error_description": "One or more scopes are not configured for the authorization server resource."

This is happening in QA environment but Dev environment is working fine with the same process.

if someone faces the same issue or having any suggestion ,please help.

When you try to create tokens, are you using the same authorization server you created these scopes on?

I checked the server and it was different but I changed it(to be same as for dev) but same issue again.