<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arif Basri</title>
    <description>The latest articles on DEV Community by Arif Basri (@arifbasri).</description>
    <link>https://dev.to/arifbasri</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F228916%2Ffd5e7af8-200f-4f37-a1df-372a1e4b2a87.jpeg</url>
      <title>DEV Community: Arif Basri</title>
      <link>https://dev.to/arifbasri</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arifbasri"/>
    <language>en</language>
    <item>
      <title>How did I learn about Transaction Log, Redo Log, and Undo Log as a developer?</title>
      <dc:creator>Arif Basri</dc:creator>
      <pubDate>Mon, 20 Oct 2025 23:58:47 +0000</pubDate>
      <link>https://dev.to/arifbasri/how-did-i-learn-about-transaction-log-redo-log-and-undo-log-as-a-developer-cie</link>
      <guid>https://dev.to/arifbasri/how-did-i-learn-about-transaction-log-redo-log-and-undo-log-as-a-developer-cie</guid>
      <description>&lt;p&gt;👉 The hard way.&lt;/p&gt;

&lt;p&gt;It wasn’t from a course or documentation — it was from bringing down production.&lt;/p&gt;

&lt;p&gt;Not because of a DELETE without WHERE, but from a massive delete that quietly filled up the transaction logs and exhausted every bit of allocated space.&lt;br&gt;
Production froze. Everyone looked at the DB.&lt;br&gt;
And the culprit? Me. 😅&lt;/p&gt;

&lt;p&gt;I’ve done it twice — once on Sybase (T-log) and once on Oracle (Redo Log).&lt;br&gt;
Different companies, same mistake.&lt;/p&gt;

&lt;p&gt;So here’s my message to all the data analysts and data wranglers:&lt;br&gt;
If you’re using the production database to temporarily store and later delete large analysis datasets — be aware that those deletes are fully logged.&lt;/p&gt;

&lt;p&gt;Every delete = undo + redo + log space consumed.&lt;br&gt;
If the log fills up, the whole system can grind to a halt.&lt;/p&gt;

&lt;p&gt;✅ Use NOLOGGING / minimal logging where possible&lt;br&gt;
✅ Do batched deletes with commits&lt;br&gt;
✅ Or better yet — don’t use prod as your scratchpad&lt;/p&gt;

&lt;p&gt;Your DBA (and your uptime) will thank you. 🙏&lt;/p&gt;

</description>
      <category>learning</category>
      <category>sql</category>
      <category>database</category>
      <category>performance</category>
    </item>
    <item>
      <title>DNS records for Mail Server</title>
      <dc:creator>Arif Basri</dc:creator>
      <pubDate>Sat, 07 Jun 2025 07:44:53 +0000</pubDate>
      <link>https://dev.to/arifbasri/dns-records-for-mail-server-5ggb</link>
      <guid>https://dev.to/arifbasri/dns-records-for-mail-server-5ggb</guid>
      <description>&lt;p&gt;There is only 1 important record for receiving mail that is the MX record.&lt;/p&gt;

&lt;p&gt;But there are 3 important records for sending mail securely. They are SPF, DKIM and DMARC records.&lt;/p&gt;

</description>
      <category>networking</category>
      <category>security</category>
      <category>howto</category>
    </item>
    <item>
      <title>3 API calls to connect to Microsoft Graph API</title>
      <dc:creator>Arif Basri</dc:creator>
      <pubDate>Sun, 19 Sep 2021 13:58:15 +0000</pubDate>
      <link>https://dev.to/arifbasri/essential-api-calls-for-your-user-to-sign-in-to-your-app-using-microsoft-identity-graph-api-3bb0</link>
      <guid>https://dev.to/arifbasri/essential-api-calls-for-your-user-to-sign-in-to-your-app-using-microsoft-identity-graph-api-3bb0</guid>
      <description>&lt;p&gt;If you are like me, reading Microsoft documentation trying to implement Microsoft identity sign in is just nightmare. After precious hours spent flipping and digging down rabbit holes, I had concluded that there are 3 HTTP calls that everyone should try and experiment first for basic understanding before reading the rest of the documentation.&lt;/p&gt;

&lt;p&gt;The scenario am explaining here is applicable for public facing web app or services that anyone can register and sign up with, for examples social media or online SaaS websites. As opposed to scenario where an internal company app allowing only their employees to sign in, or scenario where background processing automation jobs needing non-interactive login are not covered here. However once you've understand this article, you will be able to find out how to work on other scenarios on your own easily.&lt;/p&gt;

&lt;p&gt;The basic steps are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Register your app with Azure AD&lt;/li&gt;
&lt;li&gt;Get authorization code&lt;/li&gt;
&lt;li&gt;Get an access token&lt;/li&gt;
&lt;li&gt;Call Microsoft Graph with the access token&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  App registration
&lt;/h2&gt;

&lt;p&gt;Am not going at length on how to perform this task as you can find many articles on this, but am just going to declare the config used during the registration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Registration config
&lt;/h3&gt;

&lt;p&gt;Choose &lt;code&gt;Personal Microsoft accounts only&lt;/code&gt;.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2n5j61vw3qvwy8lh7hm3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2n5j61vw3qvwy8lh7hm3.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Redirect URI
&lt;/h3&gt;

&lt;p&gt;Just set anything e.g. &lt;code&gt;https://dev.to&lt;/code&gt;. We will be checking the query string once we are redirected to this URL.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl4kyjl41hp7wr9bn9g09.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl4kyjl41hp7wr9bn9g09.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once registered leave the screen as it is because you are going back to it to generate secret key and grabbing client id.&lt;/p&gt;

&lt;p&gt;Now let's fire up our postman/insomnia/any rest client you are using and get RESTing!&lt;/p&gt;

&lt;h2&gt;
  
  
  Get authorization code
&lt;/h2&gt;

&lt;p&gt;The first URL to be called is &lt;code&gt;https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize&lt;/code&gt;.&lt;br&gt;
with query strings as below&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;client_id&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;712f78dc-347f-4a1d-ac89-64ba825a8ca6&lt;/code&gt; &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4gkzfxkspys3dmdff09j.png" alt="image"&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;response_type&lt;/td&gt;
&lt;td&gt;&lt;code&gt;code&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;redirect_uri&lt;/td&gt;
&lt;td&gt;&lt;code&gt;https://dev.to&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;scope&lt;/td&gt;
&lt;td&gt;&lt;code&gt;user.read&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;response_mode&lt;/td&gt;
&lt;td&gt;&lt;code&gt;query&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;state&lt;/td&gt;
&lt;td&gt;&lt;code&gt;12345&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;You may craft the URL manually in a text editor or just use Insomnnia to generate it. Once you've filled up the key-values in Insomnia, copy the generated URL and paste it in a browser.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgstq09641gnybtpgz4bm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgstq09641gnybtpgz4bm.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I suggest you use incognito mode so that it will ignore any logged in Microsoft account and display the login screen as below:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1mtqndlgpzsm6m79ktqs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1mtqndlgpzsm6m79ktqs.png" alt="image"&gt;&lt;/a&gt;&lt;br&gt;
Enter your credentials or create new account to login and the consent screen will show up and you can now click Yes.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvztpefbodgjxy6g0ag8z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvztpefbodgjxy6g0ag8z.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally you'll get redirected to &lt;a href="https://dev.to"&gt;https://dev.to&lt;/a&gt; with query string in the URL. Grab the code in the browser's URL bar.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fem7msjpfkqp6rslwy0us.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fem7msjpfkqp6rslwy0us.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Rest of the steps will involve Insomnia solely. &lt;/p&gt;

&lt;h2&gt;
  
  
  Get an access token
&lt;/h2&gt;

&lt;p&gt;Second URL to call is to get the access token.&lt;br&gt;
&lt;em&gt;URL&lt;/em&gt;: &lt;code&gt;https://login.microsoftonline.com/consumers/oauth2/v2.0/token&lt;/code&gt;&lt;br&gt;
&lt;em&gt;Method&lt;/em&gt;: It will be a POST request.&lt;br&gt;
Header: must set&lt;code&gt;Content-Type:application/x-www-form-urlencoded&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The form params are as below:&lt;br&gt;
(you may generate the secret in Azure portal now)&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;client_id&lt;/td&gt;
&lt;td&gt;&lt;code&gt;712f78dc-347f-4a1d-ac89-64ba825a8ca6&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;client_secret&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;t1R7Q~mfEG1xdhQScpRQ~wkScI_sqlDW9Ri-F&lt;/code&gt; &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fen3l64fmypjgo54z9515.png" alt="image"&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;scope&lt;/td&gt;
&lt;td&gt;&lt;code&gt;user.read&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;redirect_uri&lt;/td&gt;
&lt;td&gt;&lt;code&gt;https://dev.to&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;grant_type&lt;/td&gt;
&lt;td&gt;&lt;code&gt;authorization_code&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;code&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;M.R3_BAY.19723c8b-2e08-819a-ade4-a8f1a8897886&lt;/code&gt;  Grab this from the previous call&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Insomnia screenshots&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpyow6v5vffrx1bi0up9c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpyow6v5vffrx1bi0up9c.png" alt="image"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd8iiroh7r4y2basit7j5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd8iiroh7r4y2basit7j5.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once posted, below is the sample response.&lt;br&gt;
The access_token is the one we are going to use next so grab that lengthy texts!&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhydg28ik10igp0snztqg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhydg28ik10igp0snztqg.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Call Microsoft Graph API
&lt;/h2&gt;

&lt;p&gt;The final URL would be the call to the Graph API itself to get the user profile that has signed in.&lt;br&gt;
URL: &lt;code&gt;https://graph.microsoft.com/v1.0/me&lt;/code&gt;&lt;br&gt;
Method: The method is GET &lt;br&gt;
Header: we need to send the Authorization header.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzlao8kpembln1ea6vevi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzlao8kpembln1ea6vevi.png" alt="image"&gt;&lt;/a&gt;&lt;br&gt;
The value of the header must be the word Bearer + the access_token. Example if the access_token was &lt;code&gt;EwBQA8l6BAAU...&lt;/code&gt;, the Authorization header value will be &lt;code&gt;Bearer EwBQA8l6BAAU...&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Once you execute the GET request you will receive below sample response:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0akn6qyef0ca9w3efs64.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0akn6qyef0ca9w3efs64.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's all folks, give it a try and let me know how it goes!&lt;/p&gt;

</description>
      <category>azure</category>
      <category>graphapi</category>
      <category>sso</category>
      <category>microsoft</category>
    </item>
  </channel>
</rss>
