How to get access package information using graph azure api

GKaur 0 Reputation points

I am bringing user in AD as guest using B2B .I want to read access package request information of signed user . Ho can I read information using azue graph api in my app ? how can I authenticate guest user using azure authentication to access my app ?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
2,106 questions
Microsoft Graph Users API
Microsoft Graph Users API
A Microsoft API that allows you to build compelling app experiences based on users, their relationships with other users and groups, and the resources they access for example their mails, calendars, files, administrative roles, group memberships.
877 questions
Microsoft Graph Identity API
Microsoft Graph Identity API
A Microsoft API to access Azure Active Directory (Azure AD) resources to enable scenarios like managing administrator (directory) roles, inviting external users to an organization, and, if you are a Cloud Solution Provider (CSP), managing your customer's data.
308 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 28,531 Reputation points

    Hi @GKaur

    Of course, if the target user has joined your tenant as a guest, its authentication method is no different from that of a member user.

    Since this involves user login, you need to use a delegated authentication flow to obtain an access token, such as the auth code flow.

    First run the authorization URL in the browser and log in to the app using the guest user to get the authorization code.{tenant id}/oauth2/v2.0/authorize?
    client_id={client id}
    &redirect_uri={redirect url}

    Then use the authorization code to redeem the access token.

    POST /{tenant}/oauth2/v2.0/token HTTP/1.1
    Content-Type: application/x-www-form-urlencoded
    client_id={client id}
    &redirect_uri={redirect url}
    &client_secret={client secret} 

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.