Closed Trazzmonger closed 1 year ago
Hello,
I created PR #57 to suggest some updates to the C# sample based on your bug reports.
However, that does not resolve the scope error you're seeing. You need to make sure you provide the right scope URI(s). You can find the scope for a given service on the Adobe Developer Console:
Service Account (JWT)
Generate JWT
tabFor example, I mostly work with the User Management API, so the scope I'd provide is
https://ims-na1.adobelogin.com/s/ent_user_sdk
Once you set the scope(s) associated with your project you should stop getting the error.
Thank you, thank you, thank you - that five-step procedure you provided worked!!!
Apparently my payload requires the ent_adobeio_sdk scope (which wasn't in the C#.NET sample code - the C#.NET sample code lists the ent_user_sdk scope ... but not ent_adobeio_sdk).
I strongly recommend you add that five-step process to the sample code and/or documentation. (And, my apologies if it's already documented somewhere that I simply overlooked.)
Expected Behaviour
The sample code is supposed to build a JWT object and then pass it in an Adobe API call to get back an "access token".
Actual Behaviour
Such API calls are failing with a response.Content of: "{\"error_description\":\"The metascopes in the JWT are not a subset of the metascopes in the binding.\",\"error\":\"invalid_scope\"}"
Reproduce Scenario (including but not limited to)
Use the sample code to make the API call. NOTE: I successfully get an Access Token when I copy-paste my Adobe API Project's private key into the GUI box provided for such testing at https://developer.adobe.com/console/projects/374378/4566206088344859311/apis/AdobeIOManagementAPISDK/details.
Steps to Reproduce
Platform and Version
Windows 10 running Microsoft Visual Studio 2019.
Sample Code that illustrates the problem
Current code leveraging an older version of the RestSharp library (e.g., v106.13.0).
Logs taken while reproducing problem
n/a