Join BoxWorks in San Francisco Nov 12-13! Keynotes, product demos, and Box Master Classes. Reserve your spot!

JWT authentication: "Please check the 'sub' claim. The 'sub' specified is invalid."

New post

Comments

7 comments

  • Álvaro Cortés Casado

    I'm getting the exact same exception using .NET core and I cannot find the reason.

    1
    Comment actions Permalink
  • Rui Barbosa

    Hi Caridad and Alvaro,

    The reason is the enterprise id being 0.

    This is on our side, and there is not much you can do for now.

    I ask for your patience while we resolve the situation, it should be back to normal soon.

    Best regards

    2
    Comment actions Permalink
  • Vasilii Mikirtumov

    Dear Box team,

    I have the same issue when I try to enable JWT Authenticating. 

    The sample code is below:

    from boxsdk import JWTAuth, Client

    auth = JWTAuth.from_settings_file('path_to_config.json')
    client = Client(auth)
    service_account = client.user().get()
    print(f'Service Account user ID is {service_account.id}')

    I get an error: {'error': 'invalid_grant',
     'error_description': "Please check the 'sub' claim. The 'sub' specified is "
                          'invalid.'}

    I also have "enterpriseID": "0" in this json file which was generated by the box, I didn't edit it.

    Thank you

    Vasilii 

    0
    Comment actions Permalink
  • Rui Barbosa

    Hi Vasilii,

    It's the same issue on our side.

    I'm told it will be back soon, but unfortunately I don't have a time line.

    In the mean time if you are working for a Box customer with an enterprise id, you can ask them to create a sandbox for you.

    I apologize for this situation.

    Best regards

    0
    Comment actions Permalink
  • James Mevis

    Has there been an update on this particular item re: timeline of a fix.  (enterprise id = 0). 

    I just encountered it as well and found this thread.

    Thanks!

    1
    Comment actions Permalink
  • Arslan Awan

    Also running into the same problem. Any guidance on how to resolve this? Thank you.

    0
    Comment actions Permalink
  • Rui Barbosa

    Hi foks,

    This forum will be decommissioned soon.

    Please post your questions on forum.box.com

    Best regards

     

    0
    Comment actions Permalink

Post is closed for comments.