Azure-Samples / active-directory-b2c-ios-swift-native-msal

An iOS sample in Swift that authenticates Azure AD B2C users and calls an API using OAuth 2.0
https://aka.ms/aadb2c
MIT License
45 stars 22 forks source link

How to limit scopes for idToken? #33

Closed rbinrais closed 4 years ago

rbinrais commented 4 years ago

I need guidance on how to set the scope for idToken because I do not need access_token.

Currently, the sample requires scope to be set even for an id_token. The empty scope or the scope of openid is not supported either.

let kScopes: [String] = ["https://ultimatetest1.onmicrosoft.com/Read"] // This is a scope that you've configured your backend API to look for.

It would be helpful to get some guidance.

oldalton commented 4 years ago

This is currently not supported, but we have a feature tracking ticket to improve that: https://github.com/AzureAD/microsoft-authentication-library-for-objc/issues/852

Closing as duplicate.