1
votes

I'm Try to adding scope @"offline_access",@"openid" ,@"profile" in Below Code But Show Me Error

MSALPublicClientApplication *application = [self createClientApplication];

[application acquireTokenForScopes:@[@"User.Read", @"Calendars.Read",@"Calendars.ReadWrite",@"Calendars.ReadWrite.Shared",@"Contacts.ReadWrite",@"Contacts.ReadWrite.Shared",@"Tasks.ReadWrite",@"Tasks.ReadWrite.Shared",@"User.Read.All", @"User.ReadBasic.All", @"profile"] completionBlock:^(MSALResult *result, NSError *error)

Showing Error : MSAL 0.1.1-dev iOS Sim 10.3 [2017-11-13 09:39:50 - 496E2A0F-2D99-4171-96A9-D36ABCB08188] MSALErrorInvalidParameter: {( openid, profile, "offline_access" )} are reserved scopes and may not be specified in the acquire token call. (-[MSALBaseRequest validateScopeInput:error:]:96)

1

1 Answers

0
votes

MSAL automatically includes those 3 scopes (offline_access, openid, and profile) in each request, you don't have to explicitly pass them.