none
Office 365 v2.0 API: Permissions consent not being persisted using OAuth RRS feed

  • Question

  • Hi, 

    We are currently authenticating our users using v2 of the API. Here is our get request for an authorization code

    https://login.microsoftonline.com/common/oauth2/v2.0/authorize?response_type=code&client_id%20=d35613f5-9aa6-4cfb-9ff5-456386ea2cd8&redirect_uri=http://localhost:5000/auth/office365/return&state%20=login&scope=https%3A%2F%2Foutlook.office.com%2FCalendars.ReadWrite%20offline_access%20openid

    This works and allows a user to sign in. The problem is that we get the consent prompt every time a user logs in. From what I've read here, https://msdn.microsoft.com/en-us/office/office365/howto/authentication-v2-scopes-permissions-consent, it sounds like Microsoft is responsible for saving consent? Here's the relevant paragraph

    After the user enters their credentials, the v2.0 endpoint will check for a matching record of user consent. If the user has not consented to any of the requested permissions in the past, the v2.0 endpoint will ask the user to grant the requested permissions. When the user approves the permission, the consent will be recorded so that the user does not have to re-consent on subsequent sign-ins.

    Any ideas if this could be related to our request above or with the configuration of our app? Or if this is a known issue? 



    Tuesday, December 1, 2015 6:31 PM

All replies

  • Hi Andrew,

    >> This works and allows a user to sign in. The problem is that we get the consent prompt every time a user logs in

    What is your project type?

    How long between you sign in after you consent prompt? I made a test with your description and follow the link below:

    # Working with the converged Azure AD v2 app model
    http://blogs.msdn.com/b/richard_dizeregas_blog/archive/2015/09/04/working-with-the-converged-azure-ad-v2-app-model.aspx

    My post url as below:

    https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=07505919-f032-4bb0-9a98-feaa070886df&scope=openid+https://outlook.office.com/contacts.read+offline_access&redirect_uri=http://localhost:3930/&response_type=code
    
    https://login.microsoftonline.com/common/oauth2/v2.0/authorize?response_type=code&client_id=07505919-f032-4bb0-9a98-feaa070886df&redirect_uri=http://localhost:3930/&scope=https://outlook.office.com/contacts.read offline_access openid

    If I immediately resign in after consent prompt, I will get the consent prompt again every time. But, after about one hour, the consent prompt page would not show up again, and it directly turn to the redirect url.

    I suggest you try your project again with the same user account which has consent prompt.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Wednesday, December 2, 2015 8:47 AM
  • Hi Edward,

    Thanks for taking the time to help. Unfortunately, trying after 1 hour did not work for us. We have been consenting to permissions for over a week now. Do you have any other ideas what might be causing the issue?

    Thanks,

    Andrew

    Tuesday, December 8, 2015 4:09 AM
  • Hi Andrew,

    I follow the steps in the link below, I suggest you try the link below to check whether this issue still exist.

    # Write a ASP.NET MVC Web app to get Outlook mail
    https://dev.outlook.com/RestGettingStarted/Tutorial/dotnet

    If the above link worked correctly for you, I assume it might be related with your project type or steps. If so, it would be helpful if you could share us your details steps to create your project.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, December 8, 2015 7:52 AM