Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Active Directory example configuration #485

Open
jfitz1 opened this issue Nov 22, 2019 · 4 comments
Open

Azure Active Directory example configuration #485

jfitz1 opened this issue Nov 22, 2019 · 4 comments

Comments

@jfitz1
Copy link

jfitz1 commented Nov 22, 2019

Example configuration for Azure Active Directory with this library would be beneficial.

@WilliamDenniss
Copy link
Member

I'd love to see one! As this is a community library, we rely on people to submit pull requests with this kind of content.

@ykphuah
Copy link

ykphuah commented Mar 6, 2020

I finally managed to get this up after 1 week. Microsoft recommended p2 OAuth, but I am already using this AppAuth for Gmail, so I would like to use it for Microsoft as well. The main issue that kept my thing from working is that in the Web Configuration, Microsoft will by default creates a callback URL such as this: com.domain://auth after we add an iOS/macOS app. This doesn't work. The issue is that this URL doesn't have the trailing / hence AppAuth's URL matching will not work, as the URL coming back doesn't match the URL we configured because of the missing /.

The workaround that worked is to add a "Mobile and Desktop applications", and then use a custom URL with a trailing slash, e.g. com.domain://auth/. Then AppAuth works beautifully as expected! I then realised that Microsoft themselves have recommended to use "Mobile and Desktop applications" here https://docs.microsoft.com/en-us/outlook/rest/ios-tutorial instead of "iOS / MacOS" application!! Such confusing process.

@bobsmits
Copy link

I finally managed to get this up after 1 week. Microsoft recommended p2 OAuth, but I am already using this AppAuth for Gmail, so I would like to use it for Microsoft as well. The main issue that kept my thing from working is that in the Web Configuration, Microsoft will by default creates a callback URL such as this: com.domain://auth after we add an iOS/macOS app. This doesn't work. The issue is that this URL doesn't have the trailing / hence AppAuth's URL matching will not work, as the URL coming back doesn't match the URL we configured because of the missing /.

The workaround that worked is to add a "Mobile and Desktop applications", and then use a custom URL with a trailing slash, e.g. com.domain://auth/. Then AppAuth works beautifully as expected! I then realised that Microsoft themselves have recommended to use "Mobile and Desktop applications" here https://docs.microsoft.com/en-us/outlook/rest/ios-tutorial instead of "iOS / MacOS" application!! Such confusing process.

That trailing slash. My hero!

@npazkevich
Copy link

@ykphuah Man, you've just saved me the weekend. Thank you a lot👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants