1

I want to build a user review application for Azure AD. But unfortunately there is no Azure AD user property that indicates the inviting user.

Is there any way to find out who has invited a guest user?

Md Farid Uddin Kiron
  • 16,817
  • 3
  • 17
  • 43
Peter Hödl
  • 21
  • 1
  • 2

1 Answers1

3

Yeah you can find out who has invited Guest User in your tenant. To do this you have two ways:

1. Azure Portal

  1. Log In to Azure portal
  2. Click on Azure Active Directory
  3. Under Monitoring Click on Audit logs

See the screen shot below:

enter image description here

Azure portal operation you could refer this docs

2. Microsoft Graph API Reference:

You can also retrieve who has invited Guest User in your tenant using MicrosftGraph API: See the below steps:

Request URL: https://graph.microsoft.com/v1.0/auditLogs/directoryAudits

Permission Required: AuditLog.Read.All

See the screen shot how would you do it in azure portal

enter image description here

Once you add permission then click on Grant admin consent for YourTenant

Test On Post Man:

enter image description here

You would seen on the picture initiatedBy your guest user.

If you need more information you could refer this official docs

Md Farid Uddin Kiron
  • 16,817
  • 3
  • 17
  • 43
  • Thanks for this. Unfortunately it doesn't work (of course) if they were added longer ago than the audit log retention period - it would be nice if this metadata were retained linked to the user rather than disappearing after 30 / 90 days. – sparrowt Nov 18 '22 at 14:30