Request Oauth token with certificate based authenticatoin

mmyhre
Tera Contributor

Hi,

I am trying to figure out how to request an Oauth token with a certificate to authenticate with.

Client secret is not deemed safe enough from the security department. Since it's a required field for an Application reqistry I guess it won't work without...

I have an python example on how to do it, but can't figure out to work with msal it with javascript in ServiceNow:

import msalapp = msal.ConfidentialClientApplication(
    client_id=https://app.at.xxxx/nbim-erp/,
    client_credential={
        "thumbprint": "6418BAC9CBF8DB7DB1AF0449D520E8E7B3925D80",
        "private_key": """-----BEGIN RSA PRIVATE KEY-----
Utelatt
-----END RSA PRIVATE KEY-----"""
    },
    authority=https://fs.at.xxxxxxx/adfs/,
)result = app.acquire_token_for_client([https://app.at.xxxxxx/erp/])
print(result)

 

-Michael-

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi

to the best of my knowledge that is not possible with ServiceNow (currently)

Maik

View solution in original post

2 REPLIES 2

Maik Skoddow
Tera Patron
Tera Patron

Hi

to the best of my knowledge that is not possible with ServiceNow (currently)

Maik

Thanks! Not the answer I was hoping for, but feared it was so. Plan #2 is to retrieve token with powershell through MID-server.