# What Info is Available from my APEX Social Sign-In Provider?

Sorry for the brevity, but I hope this helps someone. If you have configured APEX Social Sign-In with Google, Facebook, Okta, Azure--pick your poison--you may have struggled with figuring out what user information is available to you. If you know the name of the value you are looking for, it is pretty easy to get, but figuring out just what is being returned is not documented anywhere (at least not that I can find). So, here is what you can do...  

  

*   Create an application item A\_SOCIAL\_INFO
*   Edit your Social Sign-In authentication scheme and add the following pl/sql 

procedure post\_authentication is  
  
l\_index    varchar2(32767);  
l\_kind     number;  
l\_value    varchar2(32767);  
begin  
  
  l\_index := apex\_json.g\_values.first;  
    
  :A\_SOCIAL\_INFO := '-- Start -- <br>';  
    
  for i in 1..(apex\_json.g\_values.count) loop  
    l\_kind  := apex\_json.g\_values(l\_index).kind ;  
    if l\_kind = 4 then  
      l\_value := apex\_json.g\_values(l\_index).number\_value;  
    elsif l\_kind = 5 then  
      l\_value := apex\_json.g\_values(l\_index).varchar2\_value;  
    else  
      l\_value := null;  
    end if;      
    :A\_SOCIAL\_INFO := :A\_SOCIAL\_INFO || l\_index || ': ' || l\_kind || ':' || l\_value || '<br><br>';  
    l\_index :=  apex\_json.g\_values.next(l\_index);  
  end loop;  
    
  :A\_SOCIAL\_INFO :=  :A\_SOCIAL\_INFO || '-- End -- <br>';  
    
exception  
  when others then  
    :A\_SOCIAL\_INFO := :A\_SOCIAL\_INFO  || ' err: ' ||sqlerrm;  
    
end;  

  

*   Add post\_authentication as your Post-Authentication Procedure Name
*   Create a region on a page with region source  &A\_SOCIAL\_INFO.

  

Run the application with a new session. Review the results on your page.

  

I have noticed that some IdP's will not send information unless you explicitly request it as an additional attribute. In your AuthN scheme, add name,address to the Additional User Attributes.

  

You can then use apex\_json.get\_varchar2 to get any values based upon what you see as names in the result.

  

I realize this is brief and lacks any pictures. If you have questions, feel free to leave a comment.  
  
p.s. I'll try to get specific posts up soon for Azure, Google, Facebook, Okta, etc.
