How to diagnose a E0000022?

2.5k views Asked by At

I am having trouble utilizing the Get() function on the Groups client. I am attempting to look up the group by the “id”, but it is throwing an exception with the code ‘E0000022’. I have made sure that the id exist using the Postman REST client.

The code that is throwing the exception in my code is:

    private static OktaClient OktaClient = new OktaClient(oktaSettings);
    …
    OktaClient.GetGroupsClient().Get(GroupId);

I have included the exception below. I am just hoping for any pointers on how to diagnose this issue. left off the

  Okta.Core.OktaException was unhandled by user code
  <br>HResult=-2146233088
  <br>Message=Exception of type 'Okta.Core.OktaException' was thrown.
  <br>Source=Okta.Core
  <br>ErrorCode=E0000022
  <br>ErrorId=oaeNemvv9GBSfeYoxymTaIJ0w
  <br>ErrorLink=E0000022
  ErrorSummary=The endpoint does not support the provided HTTP method
1

There are 1 answers

0
Benjamin Wesson On

If you're getting a 405, it's likely that the namespace isn't being specified correctly. It's hard to say without seeing the rest of the code but you might try changing the above snippet to:

OktaClient.GetGroupsClient().Get(Group);