Modern Authentication Login & API Permission Set Up Guide
Working Guide
Working Guide
Modern Authentication Login & API Permission Set Up Guide
To utilize the Modern Authentication, first register an application in the Azure Active Directory or Identity and assign the needed API permissions. After the completion of registration, you will acquire the Client ID, Tenant ID, and Client Secret, which are needed for authentication.
Section 1: Register for New Application
Follow the steps mentioned below to register the application:
- Open the portal: https://entra.microsoft.com/ or https://portal.azure.com/
- Using your account credentials, sign in.
- Go to App registrations and click New Registration.
- In the application name field, fill in the name for your app.
- Under the Supported Account Types, choose who can utilize the Accounts in this organizational directory only (one Tenant).
- Click on Register to finish the app registration.
- The application will be generated successfully.
- After the registration process, save Client ID and Tenant ID.
Section 2: Allocate the API Permissions
To set up the needed permissions for the register app, follow the steps mentioned below:
- Open the registered application and, from the left-side menu, choose the API Permissions.
- Tap on Add a Permission.
- Select Microsoft Graph under Request API permissions.
- Choose the Application permissions and include the permissions.
- Given below are the permissions mentioned below; you just need to tick the required permissions:
- Files.ReadWrite.All permission.
- User.ReadWrite.All permission.
- Group.ReadWrite.All permission.
- GroupMember.ReadWrite.All permission.
- Reports.Read.All permission.
- Domain.ReadWrite.All permission.
- Directory.ReadWrite.All permission.
- Mail.ReadWrite permission.
- MailboxFolder.ReadWrite.All permission.
- MailboxItem.Read.All permission.
- MailboxSettings.ReadWrite permission.
- Mail.Send permission.
- Calendars.ReadWrite permission.
- Contacts.ReadWrite permission.
- Tasks.ReadWrite.All permission.
- Sites.ReadWrite.All permission
- Again, click on "Add a Permission" to proceed further.
- Now, change the tab to the APIs my organization uses.
- Search for Office 365 Exchange Online.
- Open and choose Application permissions, and include:
Full_access_as_app (Needed for Calendar and Task Migration functions)
- Click on Add Permissions to apply all the selected permissions.
- At this point, the permissions are included, but approval from the administrator is still pending.
Section 3: Grant Administrator Consent
- Return to the page API Permissions.
- Click Grant Admin Consent.
- Whenever the confirmation dialog shows, click on Yes to approve all the permissions.
Section 4: Create Client Secret
After allocating the permission and granting administrator consent, generate a Client Secret utilizing the following steps:
- Open App Registrations and choose the allocated application from All applications.
- Press Certificates and secrets.
- Under Client Secrets, click on New Client Secret.
- Fill in a description and select the expiry duration.
- Click on Add to create the secret.
- A new secret Value will be generated.
- Copy and store the Client Secret Value after the creation, because it will be visible only once. Later, this value will be needed while allocating the application.
