-
Notifications
You must be signed in to change notification settings - Fork 22
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
Problem with Authentication #28
Comments
@mo3bius I know for .NET, developers have to send us a scope value. I'm not sure for Obj-C, but @oldalton can answer that for us. If you don't care about configuring an API, then just use Because you're not sending in a scope, you're not getting an AccessToken back. In the AAD case, sending in user.read will get you an AT for graph. B2C is slightly different however. |
I tried to insert let kScopes: [String] = ["user.read"] // This is a scope that you've configured your backend API to look for. but show me this error message:
|
Were you able to figure out how to request the |
Unfortunately we don't support cases where no access token is returned right now. I've filed a feature request for this here: AzureAD/microsoft-authentication-library-for-objc#852
|
yes, the guideline is very confused to follow. |
and what should I fill for kGraphURI ? @oldalton |
If you are actually not calling any Web API from your client, feel free to ignore that section and you can also completely remove this function from your app: https://github.com/Azure-Samples/active-directory-b2c-ios-swift-native-msal/blob/master/MSALiOSB2C/ViewController.swift#L270. This sample is meant to show client calling your own Web API on top of initial sign in. |
Closing this issue as stale. Please reopen if needed. |
@oldalton I have already a webapp working with msal that currently is returning an id_token; But the error is still the same, "Could not acquire token: Error Domain=MSALErrorDomain Code=-50000 "(null)" UserInfo={MSALErrorDescriptionKey=Authentication response received without expected accessToken" can you give a little bit more input on this? |
@mbondoso, you'll need to create a "dummy" API like it is explained above.
|
Hi :)
I'm new with Azure B2C. I followed the indication on web site (https://docs.microsoft.com/en-us/azure/active-directory-b2c/tutorial-create-tenant) on how to create a azure b2c. Now I wanna implement it in my iOS and Android applications. I started with iOS and with this MSAL library. I followed the readme and I put my tenant fields in example variables.
I have some doubts:
Unable to create application Error Domain=MSALErrorDomain Code=-50000 "(null)" UserInfo={MSALErrorDescriptionKey=The required query schemes "msauthv2" and "msauthv3" are not registered in the app's info.plist file. Please add "msauthv2" and "msauthv3" into Info.plist under LSApplicationQueriesSchemes without any whitespaces., MSALInternalErrorCodeKey=-42001}
So I added LSApplicationQueriesSchemes.
%@ TID=2218501 MSAL 1.0.7 iOS Sim 13.3 [2020-02-05 17:40:28] Default app's access group: "Masked(not-null)". %@ TID=2218501 MSAL 1.0.7 iOS Sim 13.3 [2020-02-05 17:40:28] Using "Masked(not-null)" Team ID. %@ TID=2218501 MSAL 1.0.7 iOS Sim 13.3 [2020-02-05 17:40:28] Init MSIDKeychainTokenCache with keychainGroup: Masked(not-null)
Is that correct?
And finally when I tried to authorize, the app open a web view with the correct page I insert the credentials but return NO token and this error:
Could not acquire token: Error Domain=MSALErrorDomain Code=-50000 "(null)" UserInfo={MSALErrorDescriptionKey=Authentication response received without expected accessToken, MSALInternalErrorCodeKey=-42008, MSALCorrelationIDKey=0561E37D-1D5C-4B12-9862-6D9CC4798CB6}
But I think that is caused from some configurations errors.
PS: Is it possible to implement a custom native UI for signup, login ecc... without open a web view? If the answer is YES, how can I find some tutorial o guide?
Thank you very much!!
The text was updated successfully, but these errors were encountered: