A cloud-based identity and access management service for securing user authentication and resource access
@Kanoth Siraj , Thank you for reaching out. The error "AADSTS50020: User account '******@gmail.com' from identity provider 'live.com' does not exist in tenant 'Default Directory' and cannot access the application 'feb2bs4f-aa4b-462e-ass3-ba546510088a'(App name) in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account." is coming up as the user account used is not a Work or School account, and if you check the article that you shared "https://learn.microsoft.com/en-us/graph/api/team-post?view=graph-rest-beta&tabs=objc" and check the permission section in that article you would find that Delegated (personal Microsoft account) is Not supported. hence you get that error.
In order to get this API working, you would need a user account that is a part of your organization in Azure AD, like a Work or School account that needs to be used here.
Hope this helps.
Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as Answer; if the above response helped in answering your query.