In the mobile service authentication configuration for Azure AD, the following parameters are requested upon your request
- App url
- Customer id
- Allowed tenants
The SID of the packet is associated with MSA account authentication. Azure AD is the last at the bottom.
Refer to: Register your applications to use Azure Active Directory account login
In Azure AD, you need to create an application that matches the client ID and application ID with information on the mobile service side.
Other important information to fill out here:
- Answer URL: You must have a record with the URI of your web application (Angular hosting)
- Allow Enable single sign-on and read user profiles as delegated permission
- Allow implicit OAuth flow by editing and updating the application manifest file
For more detailed steps to follow, especially about the last item on my list, look at this sample https://github.com/AzureADSamples/SinglePageApp-AngularJS-DotNet and its README
After you receive the access token through the ADAL.JS libraries, you can use it to call the Mobile Service login method, simply providing the correct authentication provider name, and the access token obtained using ADAL.JS
Using ADAL.JS instead of the Mobile Services SDK to obtain an access token also gives you an update token, which you can cache and store to update the automatic access token; not allowing the user to enter credentials every time
source share