03-02-2021 8:53 AM - edited 02-04-2024 12:42 AM
Hello Expert,
I try to create a new mobile application with SAP SDK for iOS Assistant (6.0.2 version). I want to have an anonymous access so I choose "Api Key Only" as authentication method.
After generating the project through the assistant, I run the application but I am not able to login:
Here the logs error:
Error requesting an OAuth2SAMLBearAssertion access token while processing Anonymous Authentication. Maybe the SAML metadata was not imported into the sub-account as a trusted identity provider, check the configuration. Category: IO Error, message: 401 Unauthorized: [no body]
Please advice.
Thanks in advance,
Dario
Let me paste in the resolution of the issue if anyone meets it later:
"As the error says, we need to import SAML metadata into the sub-account for Basic auth and API key only SSO to work.
"Maybe the SAML metadata was not imported into the sub-account as a trusted identity provider, check the configuration."
Step to upload SAML metadata:
Other than that the server shows these errors:
Failed to request an OAuth2SAMLBearAssertion access token when process Anonymous Authentication. Maybe the SAML metadata has not been imported as a Trusted Identity provider into sub-account, please verify the configuration. Category: IO Error, message: 401 Unauthorized: [no body], details:
Get access token for anonymous user failed: {"name":"StatusCodeError","statusCode":500,"message":"500 - \"Generate Access Token with Saml Assertion failed: 401 Unauthorized: [no body]\"","error":"Generate Access Token with Saml Assertion failed: 401 Unauthorized: [no body]","options"...
KBA will be created soon. * UPDATE: 3052553 - API Key Only authentication fails with error: Error requesting an OAuth2SAMLBearAssertion access token while processing Anonymous Authentication.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dario,
In that case, could you please raise a ticket on component MOB-SDK-IOS-FND?
Best Regards, Ashitha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dario,
Could you the app authentication configured in the OnboardingFlowProvider of the generated app? Is it APIKeyAuthenticationStep?
Best Regards,
Ashitha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ashitha,
yes, in the autogenerated project there is an APIKeyAuthenticationStep. Also the app in mobile services is well configured with "API Key Only" as authentication method.
public var onboardingSteps: [OnboardingStep] {<br>return [<br>self.configuredWelcomeScreenStep(),<br>CompositeStep(steps: SAPcpmsDefaultSteps.configuration),<br>APIKeyAuthenticationStep(config: self.getAPIKeyAuthenticationConfig()),<br>CompositeStep(steps: SAPcpmsDefaultSteps.settingsDownload),<br>CompositeStep(steps: SAPcpmsDefaultSteps.applyDuringOnboard),<br>self.configuredUserConsentStep(),<br>self.configuredUsageCollectionConsentStep(),<br>StoreManagerStep(),<br>ODataOnboardingStep(),<br>]<br>}
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.