-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration for Microsoft Azure Login APIs #145
Comments
I have this working you need to check the response content from GetUserInfoAsync, there could be various issues and may be reported in there. I am using v2.0 so /common/oauth2/v2.0 instead scope needs to be "openid profile email" and you need to set Bearer token correctly on graph call: protected override void BeforeGetUserInfo(BeforeAfterRequestArgs args) my parse user info looks like this:
|
@justinharrell would you mind providing a pr and also update the readme? Do you think we need extra configuration for this specific configuration, or this should be the default? |
I have forked the codebase signficantly at this point removing the RestSharp dependency going to just HttpClient since very little of RestSharp is being used so a PR wouldn't make sense. I would say going with V2 is probably the way to go, you could have two different clients if you want for v1 vs v2. One thing that probably does need configuration is the tenant ID which replaces the /common/ in the url otherwise you need to make your app registration multi tenant on the Azure side for it to accept common. The configuration is sort of rigid since it's a separate class, I added tenant ID as a property of the client I would do the same for version since they only make sense for this client. |
@justinharrell We would be open to a pr that removes rest sharp :). |
I see you have windows live integration working, which is great, however if you're looking for business registrations not just Personal Microsoft Accounts... then you need Microsoft Azure
I've modelled up the basics for an AzureClient, however I'm repeatedly getting and UnexpectedResponseException,
Seems to be throwing an error at the rest response, I know it's returning a 200 Ok, as I've tested in PostMan.
But keep getting this issue, Usually I'd pull your code base and update, But unfortunately I've run out of time at the moment for this. So I'll come back later, If the owner of the code wants to test it, I can hand you a client ID and Secret to test with.
OAuth2.Client.UnexpectedResponseException: Exception of type 'OAuth2.Client.UnexpectedResponseException' was thrown. at OAuth2.Infrastructure.RestClientExtensions.VerifyResponse(IRestResponse response) in /home/runner/work/OAuth2/OAuth2/OAuth2/Infrastructure/RestClientExtensions.cs:line 16 at OAuth2.Infrastructure.RestClientExtensions.ExecuteAndVerifyAsync(IRestClient client, IRestRequest request, CancellationToken cancellationToken) in /home/runner/work/OAuth2/OAuth2/OAuth2/Infrastructure/RestClientExtensions.cs:line 24 at OAuth2.Client.OAuth2Client.GetUserInfoAsync(CancellationToken cancellationToken) in /home/runner/work/OAuth2/OAuth2/OAuth2/Client/OAuth2Client.cs:line 301 at OAuth2.Client.OAuth2Client.GetUserInfoAsync(NameValueCollection parameters, CancellationToken cancellationToken) in /home/runner/work/OAuth2/OAuth2/OAuth2/Client/OAuth2Client.cs:line 315
Here's my base client, I also included the response fields at the bottom as well.
`public class MicrosoftAzureClient : OAuth2Client
{
}`
The text was updated successfully, but these errors were encountered: