To use MSAL as the authentication provider for your applications in Kuika, you need to perform some actions in the Azure portal.
Create Application Registration
Log in to portal.azure.com.
Click Entra ID on the screen that opens or search for Entra ID in the search console.
On the Entra ID screen, click on “App registrations” in the left menu.
Click the “New registration” button on the screen that opens.
Select “Register in this Directory” on the confirmation screen.
“Register in this Directory” applies to users with more than one directory. Users with a single directory will not see this confirmation.
On the screen that opens, name your application.
Under the “Supported Account Types” heading, make the appropriate selection for the needs of the application you want to develop. In this content, we proceeded with the selection of “Accounts in any organizational directory and personal Microsoft accounts”.
Then click on the “Register” button.
Saving Application Information
The information found on the pop-up screen (Application Client ID and Tenant ID for Business accounts) will be used when defining MSAL information in Kuika.
In the Azure Portal, click on “Certificates & secrets”.
Click on the “New client secret” button.
In the Drawer that opens on the right, fill in the Description field and select the expiration time for Client Secret from the Expires field and click the “Add” button.
Back up the Value under Client Secret in a text document. This value is used for Client Secret on the platform. For security purposes, Value will not be accessible through this screen in the future.
Creating API Permissions
The permissions you want to access with MSAL are created with API permissions. API permissions screen is opened by clicking API permissions in the left menu.
On this screen, existing permissions are listed and a new permission can be created. By default, the login permission named User.Read and the permission to read the user profile come on this screen.
To create a new permission (e.g. access to the calendar) click on the “Add a permission” button.
On the screen that opens, you can add Microsoft Graph by clicking on it and selecting the permissions needed.
After adding permission, you will return to the previous screen.
Add Platform
The next step is to add a platform (Web/iOS and Android) to provide authorization.
Click on “Overview” in the left menu.
Click the “Add a Redirect URL” button opposite “Redirect URLs” on the screen that opens.
Click on the “Add a platform” button on the screen that opens.
Add Web Platform
Click on the Web button.
On the screen that opens, in the Redirect URLs field, create the Redirect URL for the Web application you will publish. (For example; https://platform.kuika.com/msalredirect)
Then create the Logout URL for the Web application you will publish in the “Front-channel logout URL” field at the bottom. (For example; https://platform.kuika.com/logout)
Click on the “Configure” button.
Add iOS Platform
If you want to publish your app as iOS and Android apps, you will need to add iOS and Android as platforms. This is not necessary for Web-only apps.
Click the “Add a platform” button to add iOS platform. Select iOS on the screen that opens.
On the next screen, enter the Bundle ID of the application and click on the “Configure” button.
When you click the “Configure” button, authorization information for your application will be displayed. This information is the same as the information on the Overview screen.
Click “Done” to complete the iOS platform addition process.
Adding Android Platform
To add an Android platform, click the “Add a platform” button, similar to iOS. Select Android on the screen that opens.
Enter the Bundle ID of the application in the Package name field.
In the Signature hash field, enter the application-specific Signature Hash in SHA-1 format as Base64.
When you click the “Configure” button, authorization information for your application will be displayed. This information is the same as the information on the Overview screen.
Click on the “Done” button to complete the process of adding the Android platform.
With these operations, you will have completed the operations you need to do in Azure Portal.