Open Closed

API Scopes gives error if name is mismatched. #8707


User avatar
0
nayan.ranjane@softtech-engr.com created

Dear Support Team, I want to give custom name for my api scope which will be different from the api resource but it gives me invalid scope error. Give me solution for this issue

  • ABP Framework version:4.2
  • UI Type MVC
  • Database System: EF Core (SQL Server)

3 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Member

    Hello

    Can you share error and some code snippet to better assist you.

    And also please check this document it will helps you.

    Thank you.

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

    stack

    2025-01-27 16:30:06 [11:00:06 ERR] Client CIVITCORE is not allowed access to scope Civit.p1. 2025-01-27 16:30:06 [11:00:06 ERR] Invalid scopes requested, {"ClientId": "CIVITCORE", "ClientName": "CIVITCORE", "GrantType": "client_credentials", "Scopes": null, "AuthorizationCode": "", "RefreshToken": "", "UserName": null, "AuthenticationContextReferenceClasses": null, "Tenant": null, "IdP": null, "Raw": {"client_id": "CIVITCORE", "client_secret": "REDACTED", "grant_type": "client_credentials", "tenant": "193A31E4-E8DD-8925-1A18-3A169DFEFDCC", "scope": "Civit.p1"}, "$type": "TokenRequestValidationLog"} 2025-01-27 16:30:06 [11:00:06 INF] {"ClientId": "CIVITCORE", "ClientName": "CIVITCORE", "RedirectUri": null, "Endpoint": "Token", "SubjectId": null, "Scopes": null, "GrantType": "client_credentials", "Error": "invalid_scope", "ErrorDescription": null, "Category": "Token", "Name": "Token Issued Failure", "EventType": "Failure", "Id": 2001, "Message": null, "ActivityId": "0HN9SAR4GUCEP:00000008", "TimeStamp": "2025-01-27T11:00:06.0000000Z", "ProcessId": 1, "LocalIpAddress": "::ffff:172.17.0.2:44374", "RemoteIpAddress": "::ffff:172.17.0.1", "$type": "TokenIssuedFailureEvent"} 2025-01-27 16:30:06 [11:00:06 INF] Request finished HTTP/1.1 POST https://192.168.4.237:44374/connect/token application/x-www-form-urlencoded 132 - 400 - application/json;+charset=UTF-8 23.8006ms

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Member

    Hello

    Can you provide steps to reproudce this issue

    Thank you.

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on December 17, 2025, 07:08
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.