OAuth2 access token received from login.microsoftonline.com not working for on behalf of flow for azure devops api
Hi,
I registered an application in Azure Active Directory, granted permission to access Azure DevOps.
As I understand it is possible to use the access token that I got from login.microsoftonline.com to request another access token for Azure DevOps (https://video2.skills-academy.com/en-us/azure/active-directory/develop/v2-oauth2-on-behalf-of-flow) but when I'm trying to do this I get this error: "AADSTS50027: JWT token is invalid or malformed". I can't understand why is this happening. I can use this token for other apis such as https://graph.microsoft.com/v1.0/users and it's working fine.
Am I missing someting? Maybe in application configuration?