Now you need to register your application in the Microsoft Application Registration Portal:
- Register your application via the Microsoft Application Registration Portal
- Enter a name for your application and your email
- Make sure the option for Guided Setup is checked
- Follow the instructions to add a Redirect URL to your application
Now you need to register your application in the Microsoft Application Registration Portal:
- Go to the Microsoft Application Registration Portal to register an application
- Enter a name for your application and your email
- Make sure the option for Guided Setup is unchecked
- Click
Add Platform
, then selectWeb
- Go back to Visual Studio and, in Solution Explorer, select the project and look at the Properties window (if you don’t see a Properties window, press F4)
- Change SSL Enabled to
True
- Copy the SSL URL and add this URL to the list of Redirect URLs in the Registration Portal’s list of Redirect URLs:
- Add the following in
web.config
located in the root folder under the sectionconfiguration\appSettings
:
<add key="ClientId" value="Enter_the_Application_Id_here" />
<add key="redirectUri" value="Enter_the_Redirect_URL_here" />
<add key="Tenant" value="common" />
<add key="Authority" value="https://login.microsoftonline.com/{0}/v2.0" />
- Replace `ClientId` with the Application Id you just registered
- Replace `redirectUri` with the SSL URL of your project