Open fei-fang opened 4 years ago
fyi, I'm using an organization account
Make sure you copy just the URL, no quotes. You can share it and hide details if needed.
Make sure you copy just the URL, no quotes. You can share it and hide details if needed.
Hi KTibow,
Thank you for your reply! If you mean the redirect URL, I'm quite sure I copy the right URL 'http://localhost:8080/'. Because I used my own personal account to try this yesterday, it worked well. So I think the issue may be from my official account settings, do you know what settings or access should the account satisfy to achieve this api?
Thanks!
I don't really know about different types of accounts. By exactly, I mean the bit where it gives you the URL that you open in your browser.
fei-fang, did you solve it? I have the same issue exactly.
My code:
redirect_uri = 'http://localhost:8080/'
client_secret = '****'
client_id='924a6f74-66f5-4ff7-9c62-24f2141feb08'
api_base_url='https://api.onedrive.com/v1.0/'
scopes=['onedrive.readwrite']
http_provider = onedrivesdk.HttpProvider()
auth_provider = onedrivesdk.AuthProvider(
http_provider=http_provider,
client_id=client_id,
scopes=scopes)
client = onedrivesdk.OneDriveClient(api_base_url, auth_provider, http_provider)
auth_url = client.auth_provider.get_auth_url(redirect_uri)
# Ask for the code
print('Paste this URL into your browser, approve the app\'s access.')
print('Copy everything in the address bar after "code=", and paste it below.')
print(auth_url)
code = input('Paste code here: ')
client.auth_provider.authenticate(code, redirect_uri, client_secret)
When I paste the 'auth_url' in the browser I get:
unauthorized_client: The client does not exist or is not enabled for consumers. If you are the application developer, configure a new application through the App Registrations in the Azure Portal at https://go.microsoft.com/fwlink/?linkid=2083908.
i have the same problem, did you find the solution?
Make sure in Azure the redirect URI is correct.
I wanna try running the following code:
_redirect_uri = 'http://localhost:8080/' client_secret = '***' client_id='700d805e-d442-4af0-a4b1-b17a1201bb5f' api_base_url='https://api.onedrive.com/v1.0/' scopes=['wl.signin', 'wl.offline_access', 'onedrive.readwrite'] http_provider = onedrivesdk.HttpProvider() auth_provider = onedrivesdk.AuthProvider( http_provider=http_provider, client_id=client_id, scopes=scopes)
client = onedrivesdk.OneDriveClient(api_base_url, auth_provider, http_provider) auth_url = client.auth_provider.get_auth_url(redirecturi)
But when I click the auth_url to do authentication, the website shows as:
_We're unable to complete your request: unauthorizedclient: The client does not exist or is not enabled for consumers. If you are the application developer, configure a new application through the App Registrations in the Azure Portal at https://go.microsoft.com/fwlink/?linkid=2083908.
My app details are shown below:
Does anyone have an idea why this will occur?