That URL will redirect you to the Redirect URI that you set up and with a code= something in the URL. Use the Scopes and the Redirect URI that you set up in Azure Portal. Open a browser and go to the URL below.If we add new permissions, the tokens that we have will become invalid and we have to do this manual part again. I also thought about using Selenium for this, but since it's only one time and my app will request tokens every hour (keeping the tokens fresh), I dropped that idea. There must be a programmatic way to do this, but I had no idea how to do it. Looks like to get a token for the first time we have to use a browser or emulate something like that. I did not create any Certificate or Secret. The offline_access is to be able to get the refresh token, which will be crucial to keep the app running without asking the user to login. I added User.Read, Files.ReadWrite and offline_access.
0 Comments
Leave a Reply. |