Hi @GUIOT Nicolas
This is not an id token, but an app-only token. Delegated permissions you grant to the calling app are not synced into the app-only token.
You should request a delegated access token using the delegated authentication flow. Don't forget to grant user consent for your permissions when logging in the user.
https://login.microsoftonline.com/{tenant id}/oauth2/v2.0/authorize?
client_id={client id}
&response_type=code
&redirect_uri={redirect url}
&response_mode=query
&scope=Tasks.ReadWrite
&state=12345
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.