1
votes

I registered my app at https://apps.dev.microsoft.com/. 1- I am trying to access calendar rest api. To perform the oauth2, i need the client secret. I can't seem to find the client secret. There is the option for password or private key but using both of those throws an error. Can you please tell me where to find the client secret?

2- There are multiple documents talking about multiple ways of registering an app. Should i register my app at https://apps.dev.microsoft.com/ which using the following end point or authorization: https://login.microsoftonline.com/common/oauth2/v2.0/authorize?

or the make an account on Azure AD and use the following end point: https://login.microsoftonline.com/common/oauth2/authorize?

2

2 Answers

1
votes
  1. You get the secret by clicking Generate Password in the Application Secrets section when you're viewing your app registration on apps.dev.microsoft.com. If you generate one and don't copy it, you can never retrieve it! If that's the case, you can remove the old secret and generate a new one. There's a walkthrough of registering and getting your secret at https://dev.outlook.com/RestGettingStarted/Tutorial/dotnet (section 3).
  2. I recommend you use apps.dev.microsoft.com.
1
votes
  1. Have a look at the https://msdn.microsoft.com/office/office365/HowTo/authentication-v2-preview, especially the "Restrictions on app registrations" section.

Certain limitation are applied depending on how you register a new app.

At this time, all apps that want to integrate with the v2.0 app model must create a new app registration at apps.dev.microsoft.com. Any existing Azure AD or Microsoft Account applications will not be compatible with the v2.0 app model, nor will applications registered in any portal besides the new App Registration Portal. There is no migration path for an application from the generally available Azure AD service to the v2.0 app model.

Similarly, apps registered in the new App Registration Portal will work exclusively with the v2.0 app model. You can not use the App Registration Portal to create apps that will integrate successfully with the Azure Active Directory or Microsoft Account services."

Depending on your needs you should pick how you register your app.