Hi there,
I am trying to authenticate the CogniteClient in bluefield using our Azure B2C:
response = requests.request("POST", "https://oceandataplatform.b2clogin.com/oceandataplatform.onmicrosoft.com/B2C_1A_ROPC_Auth/oauth2/v2.0/token", headers={
'Content-Type': 'application/x-www-form-urlencoded'
}, data={
"grant_type": 'password',
"client_id": client_id,
"scope": 'openid https://westeurope-1.cognitedata.com/user_impersonation',
"username": username,
"password": password,
})
creds = response.json()
client = CogniteClient(
token=creds["access_token"],
project="oceandata",
base_url='https://westeurope-1.cognitedata.com',
client_name="cognite-python-dev",
debug=True,
)
This works perfectly :)
Edit: I initially asked how to get this working before spotting a typo in the code. Everything works fine now. Leaving the post here so that others may use it for reference.