Currently I am working on building a Java web app which integrates with OneDriveForBusiness. So for integration I am using REST API's provided by microsoft. For authentication I am following the steps explained in this blog https://dev.onedrive.com/auth/aad_oauth.htm
and by following steps explained in this blog I am able to get access token only for admin and for normal users I am getting following error
"Sorry, but we’re having trouble signing you in. We received a bad request." and also at the bottom microsoft is sending following message
"AADSTS90093: This operation can only be performed by an administrator. Sign out and sign in as an administrator or contact one of your organization's administrators."
I am getting this error while requesting the access-code itself and this is happening as soon as I enter normal user's username and password, it's not even hitting my callback url
In addition to the steps mentioned in the blog I also tried authenticating normal user by sending "resource and state" parameters and I still got same message.
Can anyone help me how to get access tokens for normal users. It will be helpful if you can provide me some blogs. Thank you