Create Any Application from the OIN Catalog via API
Last Updated:
Overview
This article aims to bring more context surrounding what is possible with the <url>/api/v1/apps API call.
Applies To
- Okta API
- Okta Integration Network (OIN)
Cause
As per the Application documentation, Okta API currently supports creating applications already in the application catalog. However, it is not limited to the described applications (such as Google Workspace, Microsoft Office 365, Org2Org).
Solution
In the API call payload, provided we call the right application name, as in the example below, any app can be generated via API calls:
{
"name": "cornerstone",
"label": "created via API",
"signOnMode": "SAML_2_0",
"settings": {
"app": {
"orgName": "dan",
"acsURL": null,
"url": "https://example.com/login.html"
},
"signOn": {
"destinationOverride": "http://www.okta.com",
"attributeStatements": [
{
"type": "EXPRESSION",
"name": "nameFromAPI",
"namespace": "urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified",
"values": [
"Value1FromAPI",
"Value2FromAPI"
]
},
{
"type": "EXPRESSION",
"name": "name2FromAPI",
"namespace": "urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified",
"values": [
"Value1FromAPI",
"Value2FromAPI",
"Value3FromAPI"
]
},
{
"type": "GROUP",
"name": "GroupNameFromAPI",
"namespace": "urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified",
"filterType": "STARTS_WITH",
"filterValue": "ValueFromAPI"
}
]
}
}
}
NOTE: "name" is a variable that defines which application is created, while "label" will only reflect the application's naming convention.
Not every application from the catalog is the same, which means that each application might have different parameters to be used in the API. The "name" parameter and other parameters that an application uses can be gathered by utilising the <url>/api/v1/apps/<appId> API call of an already integrated application using the UI.
