Good day,

I am creating an Azure Web API application using .Net 4.6.1.

I have just a simple test controller that returns the string "success".  I 
have followed the instructions 
here: 
https://blogs.msdn.microsoft.com/pratushb/2016/04/28/enable-swagger-to-authenticate-against-azure-ad/
 
and I have successfully setup the OAuth2 bearer tokens on the PUBLISHED 
azure web api site.

I have now tried to setup swagger, with the OAuth2 tokens from our AD 
tenant, to work when debugging on my https://;ocalhost:44305.  I click the 
'On' button for the OAuth2 token and it goes to Azure AD and gets a token. 
 But the token is apparently invalid and just keeps telling me I am not 
authorized.  I did the exact same setup TWICE now and it continuously works 
on the published Azure API site.  Localhost continues to deny me.  If I 
remove the [Authorize] tags on the controller methods, it works fine.

Any thoughts, comments, questions are welcome.

Thank you for your time.

V/R
J

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to