0

Use Case: There is a Community that the User has to login to using SSO. A custom SAML JITHandler is configured for the same to assign a PermissionSet to the User.

We now need to make this PermissionSet Session based. However we are unable to get the Session Id in the JIT handler. Tried using Auth.SessionManagement, and UserInfo.getSessionId() but both these calls error out.

Is there any other way to get the session id in the JIT Handler, or another way that we can implement the Session Based PermissionSet assignment?

0

1 Answer 1

0

The JIT handler executes before the user is logged in, so there's no session you can use. Instead, use a Login Flow to specify any Session Based Permissions. There's a trailhead that goes in to more details.

1
  • Hi @sfdcfox, thank you for your suggestion, the Community has an lwc component inbuilt, so we activated the PermissionSet through Apex via the LWC component.
    – Nevds
    Mar 17, 2020 at 11:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .