I’m trying to use @okta /okta-sdk-nodejs to create application with custom app level profile attributes. According to the API document I can set profile field. However in @okta /okta-sdk-nodejs , ApplicationOptions type doesn’t have profile field.
Any help would be grateful
erik
May 12, 2022, 5:23am
2
Hello,
You might want to create an issue for the SDK .
For the time you can use the generic syntax which can be used to call APIs not implemented by the SDK.
Hi there!
Can you please provide clear (step by step) instructions? I am unable to understand what you are talking.
erik
May 13, 2022, 6:42am
4
const application = {
name: 'template_basic_auth',
label: 'My Sample Basic Auth App',
signOnMode: 'BASIC_AUTH',
settings: {
app: {
url: 'https://example.com/auth.htm',
authURL: 'https://example.com/login.html'
}
},
profile: {
key1: 'value1',
key2: 'value2'
}
};
const url = `${client.baseUrl}/api/v1/apps`;
const request = {
method: 'post',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
body: application
};
client.http.postJson(url, request)
.then(res => {
console.log(res);
})
.catch(err => {
console.log(err);
});
erick provided a working code. That works that does not use createApplication method. I think it is only way for now.