Hello,
To get the userID send an HTTP GET response to Graph API:
GET /me
Example response: "id": "87d349ed-44d7-43e1-9a83-5f2406dee5bd"
Get user (documentation)
https://learn.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http
On the other hand, the Application itself also has an ID (called sessionID). You will want to open the application you are trying to use and find its ID (looks similar to the userID). The Application ID can be found in the Azure AD Portal.
If this is helpful please accept answer.