Trouble with Okta SSO Authentication and Google Site Access Issue

Title: Trouble with Okta SSO Authentication and Google Site Access

Issue:

I am trying to authenticate users via Okta using SSO (SAML) and then access Google Sites. I’m using Postman to test this flow, but I’m encountering issues in the process. Manually using Browser, I am able to Login to Okta and then access Google Site but I want to do that same but using code. Steps that I am following:

Steps I have Taken:

  1. Obtain Okta Session Token:
  • Endpoint: https://{yourOktaDomain}/api/v1/authn
  • Method: POST
  • Headers: Content-Type: application/json
  • Body: json { “username”: “your_username”, “password”: “your_password” }
  • Result: Successfully received sessionToken.
  1. Obtain Okta Session ID (SID):
  • Endpoint: https://{yourOktaDomain}/api/v1/sessions
  • Method: POST
  • Headers: Content-Type: application/json
  • Body: json { “sessionToken”: “your_session_token” }
  • Result: Successfully received id (SID).
  1. Initiate SSO Authentication:
  • Endpoint: https://{yourOktaDomain}/app/google/{app-id}/sso/saml
  • Cookie: “sid:session-id”
  • Method: GET
  • Result: The response in Okta Login Page

Where I Need Help:

How can I correctly using SID and use it to SSO Google?

Any help or guidance on properly handling this authentication flow would be greatly appreciated. Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.