FabianZoon / SCIM2

.Net Library for SCIM2.0. Especially designed for OKTA provisioning.
0 stars 0 forks source link

authentication null from okta #4

Open anishsinha opened 2 years ago

anishsinha commented 2 years ago

image

I have followed steps which you have given and also added in web.config while testing connection , authentication returning null. https://sites.google.com/diligente.nl/oktakladblok/scim-app-wizard?authuser=0 image

please suggest.

FabianZoon commented 2 years ago

I think your issue is the Localhost. To push information from Okta to your application, Okta needs to be able to connect. Localhost only lives on your own laptop/desktop. You should publish your application to an online place. Than it should work (you can use a Azure website for example)

If you can't have a public place for your application, you could use the OPP connector. But that is another kind of connection,

anishsinha commented 2 years ago

Thanks for suggestions, will update you once we deploy service on azure

anishsinha commented 2 years ago

case 1 : if i am using username and password as okta account admin userId and password i am getting below error

image

image I am replicating your SDK users code
image

case 2 : if i am using username and password as username and password with above same setup getting below error image

FabianZoon commented 2 years ago

I guess, the authorization went ok, or at least it Okta sees your website. But the Test of the SCIM connector is requesting a test set of Users. If you will look in your IIS logging you should see something like below. image

In this case, I see that you want to push Users and Groups and you should have a Users and a Groups Web method your website should listen to https://imqaexchange.azurewebsites.net/oktascim.ashx?users and reply one (dummy) user.

anishsinha commented 2 years ago

I guess, the authorization went ok, or at least it Okta sees your website. But the Test of the SCIM connector is requesting a test set of Users. If you will look in your IIS logging you should see something like below. image

In this case, I see that you want to push Users and Groups and you should have a Users and a Groups Web method your website should listen to https://imqaexchange.azurewebsites.net/oktascim.ashx?users and reply one (dummy) user.

oktascim.ashx is http handler , not sure how we can add web method along in ashx file.

FabianZoon commented 2 years ago

using a ashx isn't the best way anymore. That is why I've created a nuget package with the Web Methods. Doing it in a ashx, I think you need to overwrite the IHttpHandler. A quick google I found https://briancaos.wordpress.com/2009/02/13/the-ashx-extension-writing-your-own-httphandler/ You should look in the context.Request to see if Users or Groups has been called.

anishsinha commented 2 years ago

using a ashx isn't the best way anymore. That is why I've created a nuget package with the Web Methods. Doing it in a ashx, I think you need to overwrite the IHttpHandler. A quick google I found https://briancaos.wordpress.com/2009/02/13/the-ashx-extension-writing-your-own-httphandler/ You should look in the context.Request to see if Users or Groups has been called.

Thank you . will update you once done.

anishsinha commented 2 years ago

using a ashx isn't the best way anymore. That is why I've created a nuget package with the Web Methods. Doing it in a ashx, I think you need to overwrite the IHttpHandler. A quick google I found https://briancaos.wordpress.com/2009/02/13/the-ashx-extension-writing-your-own-httphandler/ You should look in the context.Request to see if Users or Groups has been called.

image

Thank you very much !! I appreciate your guidance. I deployed your code and it is working....