Forum Discussion
Error : The token does not have one or more required security scopes
xmoncomble for the user account are you are using when calling the Graph API to retrieve the jobs, is the user account assigned the Printer Administrator role and have a Universal Print license?
If the user account already have the right permissions, you can decode the token using JWT Decoder | AD FS Help (microsoft.com) to see what permission scopes the token has. You can use the "Developer Tools" within the browser to capture the network traffic and looking at the header for the call to the Graph API. Copy the value after "Bearer" string in the "Authorization:" header and paste it into the decoder. You'll want to search for "scp" in the decoded result to see what scopes the token is carrying.
HTH,
Jimmy
- xmoncombleFeb 24, 2021Copper Contributor
Jimmy_WuI understood where the problem came from : a permission was missing.
By adding the application permission Printer.ReadWrite.All, my application is now able to list the jobs of my printer