Getting "InvalidAuthenticationToken" error code and "Access token is empty." while trying to login to upload to OneDrive

Ahmed Waseem 0 Reputation points
2024-07-19T11:37:39.96+00:00

var scopes= "files.readwrite files.readwrite.All User.Read offline_access";

var url = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?' +

		   	'client_id=xxxxxxxxxxxxxx'+	

			'&scope=' + scopes +	

			'&state=xxxxxxxx' +	

			'&response_type=token' +	

			'&redirect_uri='+ redirect_uri;	

Is there something I should do or am I doing something wrong ? It is working fot me but it is not working for one of my clients.

He gets the following error whenever he tries to login to OneDrive to upload a file

{"error":{"code":"InvalidAuthenticationToken","message":"Access token is empty.","innerError":{"date":"2024-07-18T12:09:43","request-id":"xxxxxxxxxxxx","client-request-id":"xxxxxxxxxxxxxx"}}}

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,379 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
962 questions
0 comments No comments
{count} votes