I am having a script that output .csv file. I want to upload this to onedrive.
I am not able to create an Application as I don't have permission. I have checked az cli's rest option, I am getting Error not found due to the access token not having proper access.
Currently I am using python request module for uploading to onedrive. I am using access token from graph explorer in the Authorization header of API request. This way I am able to upload the file to onedrive.
The access token from az account get-access-token output is causing a 401 Error. While with access token from graph explorer it is properly uploading the file with 201 status code.
Are there any security concern using this way? Even if it is cli script do we need to register the application in azure?
Thank you