Create an Azure AD app
Create an Azure AD app by using one of these methods:
- Create the app in the Azure portal.
- Create the app by using PowerShell.
Create an Azure AD app in the Azure portal
- Sign in to the Azure portal.
- Search for and select App registrations.
- Select New registration.
- Fill in the required information:
- Name - Enter a name for your application.
- Supported account types - Select supported account types(usually single tenant).
- Redirect URI - Enter a Mobile and Desktop Application Redirect URL(usually "https://login.microsoftonline.com/common/oauth2/nativeclient").
- Select Register.
- After you register your app, the Application ID is available from the Overview tab. Copy and save the Application ID for later use.
- Select Certificates & secrets.
- Select New client secret.
- In the Add a client secret window, enter a description, specify when you want the client secret to expire, and select Add.
- Copy and save the client secret value.
Note
After you leave this window, the client secret value is hidden, and you can't viewor copy it again.
Create an Azure AD app by using PowerShell
The following sample PowerShell script creates a new Azure AD app and a service principal. Before you run this script:
- Install the latest version of PowerShell.
- Install the Microsoft Graph PowerShell SDK.
After the script runs, make a note of the following information in the script output:
- The client ID of the new app
- The object ID of the new service principal
- The value of the service principal secret
PowerShell
Powershell
# Sign in as a user who's allowed to create an app.
Connect-MgGraph -Scopes "Application.ReadWrite.All"
# Create a new Azure AD web application.
$desktop = @{
RedirectUris = "https://login.microsoftonline.com/common/oauth2/nativeclient"
HomePageUrl = "https://localhost:44322"
}
$params = @{
DisplayName = "Business Portals"
Web = $($desktop)
}
$app = New-MgApplication @params
Write-Host "Client ID of new app: " $($app.AppId)
# Create a service principal.
$ServicePrincipalID=@{
"AppId" = $($app.AppId)
}
$sp = New-MgServicePrincipal -BodyParameter $($ServicePrincipalId)
Write-Host "Object ID of new service principal: " $($sp.Id)
# Create a key for the service principal.
$credential = Add-MgServicePrincipalPassword -ServicePrincipalId $($sp.Id)
Write-Host "Credential of new service principal: " $($credential.SecretText)
OnPrem
if you are deploying Business Portals to your own environment, you have to enter the Noted down information in the Customsettings.config file, therefore open the Business Portals Management Tool and select the the given deployment. In the Advanced Section you can enter the noted down data the specified nodes.