mbegan / Okta-PSModule

Okta API Powershell Wrapper Module
Other
102 stars 31 forks source link

Can I use this PSModule with the "emea-okta.com" domain? #6

Closed gverdijck closed 7 years ago

gverdijck commented 7 years ago

Hi,

Since a couple of months Okta also has an "emea-okta.com" domain. So besides oktapreview.com and okta.com there is now a third domain.

I have been trying to use the PSModule with oktapreview.com. Worked fine. Tried the same with "emea-okta.com" but it is not working. Either I do something wrong or the PSModule is not able to work with the new okta domain.

When that is the case, would you be so kind to create an updated version that also supports the "emea-okta.com" domain.

Thank you.

mbegan commented 7 years ago

Hi, I cannot see anything obvious in the code that would prevent an alternative domain (emea-okta.com) from working.

The baseUrl is configured entirely in the Okta_org.ps1 and there isn't anything in the code that would point to an alternative base.

That said there is a possibility that the emea based platform has some different expectations from a client that i'm not meeting.

Can you provide any additional details related to the failure? a stack trace or other error message would be a good start.

In the meantime i'll see what I can do to get my hands on an emea-okta org.

-Matt

gverdijck commented 7 years ago

Hi Matt,

This is the error I get in powershell ise:

PS C:\Users\gve> oktaListActiveUsers -oOrg Prod1

[ GET https://nutreco.emea-okta.com/api/v1/users?filter=status eq "ACTIVE"&limit=500 ]

_oktaNewCall : You cannot call a method on a null-valued expression. At C:\users\gve\desktop\OktaPS\Okta.psm1:1150 char:20

PS C:\Users\gve>

When I do the same with the our oktapreview.com tenant, it just works. I created the app key both in the same way. Copy and past to the okta_org.ps1 file. Checked again and sure I made no mistakes.

Even removed the token and created a new one. No help.

Hope you can help.


Guido Verdijck Senior IT Architect Nutreco Global IT Services

+31 485 589 621 +31 620 366 806 guido.verdijck@nutreco.commailto://guido.verdijck@nutreco.com http://www.nutreco.comhttp://http:/www.nutreco.com

[cid:image001.png@01D1E266.AF9B57F0]

Nutreco Veerstraat 38 5830 AE Boxmeer Netherlands

P Please consider the environment before printing this e-mail.


Dit e-mailbericht is vertrouwelijk en uitsluitend bestemd voor de geadresseerde. Als u niet de geadresseerde bent, verzoeken wij u vriendelijk om ons onmiddellijk op de hoogte te stellen en dit e-mailbericht te verwijderen met eventuele bijlage(n), zonder deze te kopiëren, door te sturen, openbaar te maken of voor andere doeleinden te gebruiken. Publicatie door anderen dan de beoogde geadresseerde(n) is verboden. Nutreco Nederland B.V., statutair gevestigd te Boxmeer en geregistreerd in het Handelsregister onder nr. 16058721, is niet aansprakelijk voor welke schade dan ook als gevolg van communicatie per e-mail en verzending van documenten en gegevens. De tekst van het verzonden e-mailbericht is doorslaggevend. From: Matt Egan [mailto:notifications@github.com] Sent: 19 July 2016 19:57 To: mbegan/Okta-PSModule Okta-PSModule@noreply.github.com Cc: Guido Verdijck guido.verdijck@nutreco.com; Author author@noreply.github.com Subject: Re: [mbegan/Okta-PSModule] Can I use this PSModule with the "emea-okta.com" domain? (#6)

Hi, I cannot see anything obvious in the code that would prevent an alternative domain (emea-okta.com) from working.

The baseUrl is configured entirely in the Okta_org.ps1 and there isn't anything in the code that would point to an alternative base.

That said there is a possibility that the emea based platform has some different expectations from a client that i'm not meeting.

Can you provide any additional details related to the failure? a stack trace or other error message would be a good start.

In the meantime i'll see what I can do to get my hands on an emea-okta org.

-Matt

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mbegan/Okta-PSModule/issues/6#issuecomment-233714374, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AThv2sQ6X2s0UkBNAQUBb3_rpNQT-Y-Iks5qXRABgaJpZM4JNUo7.

Click herehttps://www.mailcontrol.com/sr/FEmogO6kS!7GX2PQPOmvUvSoGVaHHSWCBFOlkk06zF0t7fncAk8dZOcPBg9IpTc7vQXFCVL5EaPX405xsHCs!A== to report this email as spam.


This e-mail is confidential and may also be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request you kindly to notify us immediately and delete this e-mail, and any attachment(s), without copying, forwarding, disclosing or using it in any other way. The publication by others than the intended person(s) is prohibited. We will not be liable for any negative consequence or damage relating to the communication by e-mail of data or documents; the text of the e-mail as sent is decisive. For any purchase made, the General Purchase Terms and Conditions of Nutreco apply. Applicability of other terms and conditions is explicitly rejected.

mbegan commented 7 years ago

Thanks, that error is probably masking a deeper error.

Can you provide the output from the following in the same powershell session after you encounter the error.

$Error[0..3].Exception.Message

This will print out the last 4 exception messages

gverdijck commented 7 years ago

PS C:\Users\gve> $Error[0..3].Exception.Message You cannot call a method on a null-valued expression. You cannot call a method on a null-valued expression. Exception calling "GetResponse" with "0" argument(s): "The remote name could not be resolved: 'nutreco.emea-okta.c om'"

It looks like a DNS issue. Somehow nutreco.emea-okta.com can not be resolved. However I can browse to this tenant and logon as a user/admin.

I found the issue. I was going to the nutreco.emea-okta.com but it should have been nutreco.okta-emea.com

Sorry for misleading you with something that was my mistake. Thank you for your help. That solved my issue because of the three error messages as shown in the picture.


Guido Verdijck Senior IT Architect Nutreco Global IT Services

+31 485 589 621 +31 620 366 806 guido.verdijck@nutreco.commailto://guido.verdijck@nutreco.com http://www.nutreco.comhttp://http:/www.nutreco.com

[cid:image001.png@01D1E372.B3BB79C0]

Nutreco Veerstraat 38 5830 AE Boxmeer Netherlands

P Please consider the environment before printing this e-mail.


Dit e-mailbericht is vertrouwelijk en uitsluitend bestemd voor de geadresseerde. Als u niet de geadresseerde bent, verzoeken wij u vriendelijk om ons onmiddellijk op de hoogte te stellen en dit e-mailbericht te verwijderen met eventuele bijlage(n), zonder deze te kopiëren, door te sturen, openbaar te maken of voor andere doeleinden te gebruiken. Publicatie door anderen dan de beoogde geadresseerde(n) is verboden. Nutreco Nederland B.V., statutair gevestigd te Boxmeer en geregistreerd in het Handelsregister onder nr. 16058721, is niet aansprakelijk voor welke schade dan ook als gevolg van communicatie per e-mail en verzending van documenten en gegevens. De tekst van het verzonden e-mailbericht is doorslaggevend. From: Matt Egan [mailto:notifications@github.com] Sent: 20 July 2016 20:43 To: mbegan/Okta-PSModule Okta-PSModule@noreply.github.com Cc: Guido Verdijck guido.verdijck@nutreco.com; Author author@noreply.github.com Subject: Re: [mbegan/Okta-PSModule] Can I use this PSModule with the "emea-okta.com" domain? (#6)

Thanks, that error is probably masking a deeper error.

Can you provide the output from the following in the same powershell session after you encounter the error.

$Error[0..3].Exception.Message

This will print out the last 4 exception messages

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mbegan/Okta-PSModule/issues/6#issuecomment-234042782, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AThv2p_FZZRXKnfufbd4NJ-e7q7u05qUks5qXmw4gaJpZM4JNUo7.

Click herehttps://www.mailcontrol.com/sr/tJNzq9FUKIrGX2PQPOmvUrxsj2JZCuwuUjK+YZcpMAKIGidKB4SoikufFD1ZoiawFKz3fDhAAfsVpvj!OtdP1Q== to report this email as spam.


This e-mail is confidential and may also be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request you kindly to notify us immediately and delete this e-mail, and any attachment(s), without copying, forwarding, disclosing or using it in any other way. The publication by others than the intended person(s) is prohibited. We will not be liable for any negative consequence or damage relating to the communication by e-mail of data or documents; the text of the e-mail as sent is decisive. For any purchase made, the General Purchase Terms and Conditions of Nutreco apply. Applicability of other terms and conditions is explicitly rejected.

mbegan commented 7 years ago

Hi Guido, thank you for the update.

Glad you got to the bottom of it, trust me i've had my fair share of similar oversights.