After a few days of research i found myself out of the problem here it is for anyone who may need it:
!!! USE AZURE WEB CLI CLIENT ID FOR STEP 1 & 3!!!
1.) in code call this link of microsoft https://login.microsoftonline.com/common/oauth2/v2.0/devicecode and request a device code
2.) give the device code to user and the URL for login which is in json.RootElement.GetProperty("verification_uri")
3.) poll the https://login.microsoftonline.com/common/oauth2/v2.0/token to get the access token until it gives u a successfull token (until the user logins succesfully), each 5secs for example
4.) congrats you now have the access token and can register an app