Closed bhandaribhumin closed 4 years ago
hi @bhandaribhumin, you don't have permissions to request User.Read.All and UserWrite.All scopes. You need admin's permission or you need to get the admin role to approve them.
@antrix1989 thanks for reply i don’t need those User.Read.All and UserWrite.All permission yet but i need to get all events first. After remove those two admin permission scope error looks same I try to archive below graph call
not working
let kScopes: [String] = ["User.Read Calendars.Read Calendars.ReadWrite "]
graph.microsoft.com/v1.0/events which is not working
working
let kScopes: [String] = ["User.Read"]
graph.microsoft.com/v1.0/me works fine
What kind of user are you signing in with? (AAD/MSA?) Can you please also provide MSAL log for the failed request. Thanks.
@oldalton i was use AAD account.
LOG:
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:38] Default app's access group: "Masked(not-null)".
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:38] Using "Masked(not-null)" Team ID.
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:38] Init MSIDKeychainTokenCache with keychainGroup: Masked(not-null)
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42] Keychain find status: 0
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42] (Default accessor) Get accounts.
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42] Keychain find status: 0
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42] Keychain find status: 0
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42] (Default accessor) Looking for token with aliases (null), tenant (null), clientId 165xxxxxxxxx48, scopes (null)
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42] Keychain find status: 0
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42] (Default accessor) Found 1 tokens
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42] (Default accessor) Found the following accounts in default accessor: MaskedArray(count=1)
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42] Keychain find status: 0
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42] (Default accessor) Found the following accounts in other accessors: MaskedArray(count=1)
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42] Keychain find status: 0
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42] Request authority cache look up for https://login.microsoftonline.com/common, using https://login.microsoftonline.com/2xxxxxxxx3fb instead
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42 - 2160743F-0FxxxxDC] [MSAL] -[MSALPublicClientApplication acquireTokenSilentForScopes:(
"User.Read Calendars.Read Calendars.ReadWrite User.Read User.Read.All User.ReadWrite.All"
)
account:Masked(not-null)
authority:(null)
validateAuthority:Yes
forceRefresh:No
correlationId:(null)
capabilities:(null)
claimsRequest:(null)]
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Beginning silent flow.
TID=671178 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Resolving authority: Masked(not-null), upn: cc47b069@rti.org
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] No cached preferred_network for authority
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:42 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Waiting on Authority Validation Queue
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Caching AAD Environements
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] networkHost: login.microsoftonline.com, cacheHost: login.windows.net, aliases: login.microsoftonline.com, login.windows.net, login.microsoft.com, sts.windows.net
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] networkHost: login.partner.microsoftonline.cn, cacheHost: login.partner.microsoftonline.cn, aliases: login.partner.microsoftonline.cn, login.chinacloudapi.cn
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] networkHost: login.microsoftonline.de, cacheHost: login.microsoftonline.de, aliases: login.microsoftonline.de
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] networkHost: login.microsoftonline.us, cacheHost: login.microsoftonline.us, aliases: login.microsoftonline.us, login.usgovcloudapi.net
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] networkHost: login-us.microsoftonline.com, cacheHost: login-us.microsoftonline.com, aliases: login-us.microsoftonline.com
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Resolved authority, validated: YES, error: 0
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Looking for access token...
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] (Default accessor) Looking for token with aliases (
"login.windows.net",
"login.microsoftonline.com",
"login.windows.net",
"login.microsoft.com",
"sts.windows.net"
), tenant 2xxxxxxfb, clientId 16xxxxxxxxxx48, scopes User.Read Calendars.Read Calendars.ReadWrite User.Read User.Read.All User.ReadWrite.All
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Keychain find status: 0
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Access token wasn't found.
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Looking for Family Refresh token...
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Keychain find status: 0
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Family Refresh token wasn't found, looking for Refresh token...
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] (Default accessor) Looking for token with aliases (
"login.windows.net",
"login.microsoftonline.com",
"login.windows.net",
"login.microsoft.com",
"sts.windows.net"
), tenant (null), clientId 16xxxxxxxxxx8, scopes (null)
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Keychain find status: 0
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] (Default accessor) Found 1 tokens
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Found Refresh token, using it...
TID=671382 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Refreshing access token
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Returned from Authority Validation Queue
TID=671379 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:43 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Acquiring Access token via Refresh token...
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 216xxxFDC] [MSAL] Validate and save token response...
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 216xxxDC] [MSAL] (Default accessor) Saving multi resource refresh token
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 216xxxxFDC] [MSAL] (Default cache) Removing credentials with type AccessToken, environment login.windows.net, realm 2ffcxxxxxxxxx3fb, clientID 16xxxxx48, unique user ID Masked(not-null), target User.Read profile openid email
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Keychain find status: 0
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] (Default cache) Removing credential Masked(not-null) for userID Masked(not-null) with environment login.windows.net, realm 2fxxxxe-xxxxxxxxx-487xxxxxb, clientID 1xxxxxxxxxx748,
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Keychain delete status: 0
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Saving keychain item, item info Masked(not-null)
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Saving keychain item, item info Masked(not-null)
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Saving keychain item, item info Masked(not-null)
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Keychain find status: 0
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Saving keychain item, item info Masked(not-null)
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 2160743F-0F3B-4952-A299-981B99C99FDC] Server returned less scopes than requested, granted scopes: {(
"User.Read",
profile,
openid,
email
)}
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 21607xxxxx9FDC] Removing reserved scopes from granted scopes: {(
openid,
profile,
"offline_access"
)}
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 2160743F-0F3B-4952-A299-981B99C99FDC] Final granted scopes: {(
"User.Read",
profile,
openid,
email
)}
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] Silent flow finished result (null), error: -51415 error domain: MSIDOAuthErrorDomain
TID=671378 MSAL 1.0.0 iOS 13.3 [2020-01-29 17:58:45 - 2160743F-0F3B-4952-A299-981B99C99FDC] [MSAL] acquireTokenSilent returning with error: (MSALErrorDomain, -50003) Masked(not-null)
Thanks for the logs. One question we had when looking at the logs was whether it could be due to calling acquireTokenSilent and not acquireToken. User might need to grant additional consent for your app in order to get all permissions and that can only happen during the interactive flow.
Could you please try calling acquireToken first with the list of scopes and see if you're getting same error? If yes, please provide a log for that as well and we'll keep looking into it. Thanks!
Are you still experiencing this issue? Please provide additional information requested above to continue investigation. Thanks.
@oldalton sorry for delay we are not using adal anymore so thanks for help. if facility team agree with adal flow then i'll raise this query again, thanks once again.
Hi Oldalton
I have been facing the same issue since a month. Please help. Below are details
Logs :
TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] (Default accessor) Get accounts. TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Keychain find status: 0 TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] (Default accessor) Looking for token with aliases (null), tenant (null), clientId (null), scopes (null) TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Keychain find status: 0 TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] (Default accessor) Found 1 tokens TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] (Default accessor) Found the following accounts in default accessor: MaskedArray(count=1) TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Keychain find status: -25300 TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] (Default accessor) Found the following accounts in other accessors: MaskedArray(count=1) TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Returning account for parameters with environment login.windows.net, identifier e9fe3977, username auth.placeholder-96cabb59@hotmail.com TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Querying MSAL accounts with parameters (identifier=Masked(null), tenantProfileId=Masked(null), username=Masked(null), return only signed in accounts 1) TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Keychain find status: 0 TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] (Default accessor) Get accounts. TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Keychain find status: 0 TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Keychain find status: 0 TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] (Default accessor) Looking for token with aliases (null), tenant (null), clientId bc00aef7-8cc6-4e1d-a6db-a3baf4f44b1f, scopes (null) TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Keychain find status: 0 TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Keychain find status: 0 TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Keychain find status: 0 TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] (Default accessor) No accounts found in default accessor. TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Keychain find status: -25300 TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] (Default accessor) No accounts found in other accessors. TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Found MSAL accounts with count 0 TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Found MSAL account with current account Masked(null), previous account auth.placeholder-96cabb59@hotmail.com Account signed out. Updating UX TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Requiring default broker type due to app being built with iOS 13 SDK TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] -[MSALPublicClientApplication acquireTokenWithParameters:( "User.Read calendars.read calendars.readwrite offline_access" ) extraScopesToConsent:(null) account:Masked(null) loginHint:Masked(null) promptType:MSALPromptTypeSelectAccount extraQueryParameters:(null) authority:(null) webviewType:MSALWebviewTypeDefault customWebview:No correlationId:(null) capabilities:(null) claimsRequest:(null)] TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Checking broker install state for version V2-broker-nonce 2020-07-18 17:48:27.134496+0530 MSALiOS[7328:233428] -canOpenURL: failed for URL: "msauthv2://broker" - error: "The operation couldn’t be completed. (OSStatus error -10814.)" TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Scheme msauthv2 for broker not present TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Beginning interactive flow. TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Resolving authority: Masked(not-null), upn: Masked(null) TID=233604 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] No cached preferred_network for authority TID=233604 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Caching AAD Environements TID=233604 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] networkHost: login.microsoftonline.com, cacheHost: login.windows.net, aliases: login.microsoftonline.com, login.windows.net, login.microsoft.com, sts.windows.net TID=233604 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] networkHost: login.partner.microsoftonline.cn, cacheHost: login.partner.microsoftonline.cn, aliases: login.partner.microsoftonline.cn, login.chinacloudapi.cn TID=233604 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] networkHost: login.microsoftonline.de, cacheHost: login.microsoftonline.de, aliases: login.microsoftonline.de TID=233604 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] networkHost: login.microsoftonline.us, cacheHost: login.microsoftonline.us, aliases: login.microsoftonline.us, login.usgovcloudapi.net TID=233604 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] networkHost: login-us.microsoftonline.com, cacheHost: login-us.microsoftonline.com, aliases: login-us.microsoftonline.com TID=233604 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Resolved authority, validated: YES, error: 0 TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:18:27] Start background app task with type 0 TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:26] Stop background task with type 0 TID=233428 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:26 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Enrollment id read from intune cache : (null). TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28] Failed to init id token claims in MSIDAADV2TokenResponse, error: Masked(null) TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Validate and save token response... TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28] Enrollment id read from intune cache : (null). TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Keychain find status: 0 TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Saving token response, only save SSO state 0 TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] (Default accessor) Saving multi resource refresh token TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28] Enrollment id read from intune cache : (null). TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] (Default cache) Removing credentials with type AccessToken, environment login.windows.net, realm 9188040d-6c67-4c5b-b112-36a304b66dad, clientID bc00aef7-8cc6-4e1d-a6db-a3baf4f44b1f, unique user ID Masked(not-null), target User.Read Calendars.Read Calendars.ReadWrite openid profile TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Keychain find status: -25300 TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Saving keychain item, item info Masked(not-null) TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Saving keychain item, item info Masked(not-null) TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Saving keychain item, item info Masked(not-null) TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Keychain find status: 0 TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Saving keychain item, item info Masked(not-null) TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] Server returned less scopes than requested, granted scopes: {( "User.Read", "Calendars.Read", "Calendars.ReadWrite", openid, profile )} TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] Removing reserved scopes from granted scopes: {( openid, profile, "offline_access" )} TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] Final granted scopes: {( "User.Read", "Calendars.Read", "Calendars.ReadWrite", openid, profile )} TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] Interactive flow finished. Result (null), error: -51415 error domain: MSIDOAuthErrorDomain TID=234118 MSAL 1.1.5 iOS Sim 13.3 [2020-07-18 12:19:28 - 315FD56D-EBD7-4E44-9405-DC8B391D2CD8] [MSAL] acquireToken returning with error: (MSALErrorDomain, -50003) Masked(not-null) Could not acquire token: Error Domain=MSALErrorDomain Code=-50003 "(null)" UserInfo={MSALDeclinedScopesKey=( "offline_access" ), MSALGrantedScopesKey=( "User.Read", "Calendars.Read", "Calendars.ReadWrite" ), MSALErrorDescriptionKey=Server returned less scopes than requested, MSALCorrelationIDKey=315FD56D-EBD7-4E44-9405-DC8B391D2CD8, MSALInvalidResultKey=<MSALResult: 0x600001bf9aa0>}
Can anyone please help me where I'm doing wrong!!!!!! I already have access of related scopes in my app says server returned less scopes then requested
also I set ViewController.swift file as kScopes:
let kScopes: [String] = ["User.Read Calendars.Read Calendars.ReadWrite User.Read User.Read.All User.ReadWrite.All"]
but I'm getting error